ffmpeg: cosmetics to reduce difference to qatar by about 90 lines

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-05-20 12:04:09 +02:00
parent c53326afad
commit 3ba90d9e97

View File

@ -1959,6 +1959,7 @@ static void do_video_out(AVFormatContext *s, OutputStream *ost,
AVFrame *in_picture, float quality) AVFrame *in_picture, float quality)
{ {
int nb_frames, i, ret, format_video_sync; int nb_frames, i, ret, format_video_sync;
AVPacket pkt;
AVCodecContext *enc; AVCodecContext *enc;
double sync_ipts, delta; double sync_ipts, delta;
double duration = 0; double duration = 0;
@ -2015,9 +2016,8 @@ static void do_video_out(AVFormatContext *s, OutputStream *ost,
av_log(NULL, AV_LOG_VERBOSE, "*** %d dup!\n", nb_frames - 1); av_log(NULL, AV_LOG_VERBOSE, "*** %d dup!\n", nb_frames - 1);
} }
/* duplicates frame if needed */
for (i = 0; i < nb_frames; i++) { duplicate_frame:
AVPacket pkt;
av_init_packet(&pkt); av_init_packet(&pkt);
pkt.data = NULL; pkt.data = NULL;
pkt.size = 0; pkt.size = 0;
@ -2103,7 +2103,10 @@ static void do_video_out(AVFormatContext *s, OutputStream *ost,
* flush, we need to limit them here, before they go into encoder. * flush, we need to limit them here, before they go into encoder.
*/ */
ost->frame_number++; ost->frame_number++;
}
if(--nb_frames)
goto duplicate_frame;
if (vstats_filename && frame_size) if (vstats_filename && frame_size)
do_video_stats(output_files[ost->file_index]->ctx, ost, frame_size); do_video_stats(output_files[ost->file_index]->ctx, ost, frame_size);
} }