[FFmpeg-devel] [PATCH 2/6] ffmpeg.c: allow using negative file indices to disable metadata copying

Michael Niedermayer michaelni
Thu Nov 4 01:33:59 CET 2010


On Tue, Nov 02, 2010 at 10:04:01PM +0100, Anton Khirnov wrote:
> ---
>  ffmpeg.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 26237a2..6daa260 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -2348,6 +2348,8 @@ static int transcode(AVFormatContext **output_files,
>  
>          int out_file_index = meta_data_maps[i][0].file;
>          int in_file_index = meta_data_maps[i][1].file;
> +        if (in_file_index < 0 || out_file_index < 0)
> +            continue;
>          METADATA_CHECK_INDEX(out_file_index, nb_output_files, "output file")
>          METADATA_CHECK_INDEX(in_file_index, nb_input_files, "input file")


lgtm

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101104/d637ae70/attachment.pgp>



More information about the ffmpeg-devel mailing list