[FFmpeg-devel] [PATCH] Guess the duration before converting video

Justin Johnson justin.johnson3
Tue Feb 2 23:15:05 CET 2010


>> ?ffmpeg.c ? ? ? ? ? ? | ? 16 ++++++++++++++++
>> ?libavformat/flvenc.c | ? ?2 +-
>> ?2 files changed, 17 insertions(+), 1 deletion(-)
>> 7891c36204280acc830838d55ad0000feb739d39 ?ffmpeg.diff
>> Index: ffmpeg.c
>> ===================================================================
>> --- ffmpeg.c ?(revision 21600)
>> +++ ffmpeg.c ?(working copy)
>> @@ -2104,6 +2104,22 @@
>> ? ? ? ? ?ist->is_start = 1;
>> ? ? ?}
>>
>> + ? ?/* set the duration of the output to the duration of the input
>> + ? ? * if the output ends up being different, it'll be corrected later */
>> + ? ?for (i=0;i<nb_output_files;i++) {
>
>> + ? ? ? ?AVFormatContext *out_file;
>> + ? ? ? ?AVFormatContext *in_file;
>> +
>> + ? ? ? ?out_file = output_files[i];
>> + ? ? ? ?in_file = input_files[i];
>
> you can merge these
>
> [...]
>> + ? ? ? ?}
>> + ? ? ? ?else {
>
> and these 2
>
> otherwise i think the patch is ok
>

I'm not quite sure what you mean. What can be merged? Do you mean just
put them in the same line?

Like this:
AVFormatContext *out_file = output_files[i];
AVFormatContext *in_file = input_files[i];

[...]
} else {

?

--Justin Johnson



More information about the ffmpeg-devel mailing list