summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-18 16:35:01 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-18 16:35:38 +0200
commitdece4f46931cc7870f7ee7022522225b5f49e709 (patch)
tree04c3b75a9646aeeedc4d8cba9b9c4a24e0d02a39 /ffmpeg.c
parent60f329108608bb17da090d195cecccf5610e47b7 (diff)
downloadffmpeg-dece4f46931cc7870f7ee7022522225b5f49e709.tar.gz
ffmpeg: revert 3ba90d9 (cosmetics to reduce difference to qatar by about 90 lines)
This commit caused Ticket1490 (Infinity loop / lock in export image) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 03fdcbc481..26dd3a1df3 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1723,7 +1723,7 @@ static void do_video_out(AVFormatContext *s,
int ret, format_video_sync;
AVPacket pkt;
AVCodecContext *enc = ost->st->codec;
- int nb_frames;
+ int nb_frames, i;
double sync_ipts, delta;
double duration = 0;
int frame_size = 0;
@@ -1782,8 +1782,8 @@ static void do_video_out(AVFormatContext *s,
av_log(NULL, AV_LOG_VERBOSE, "*** %d dup!\n", nb_frames - 1);
}
-
-duplicate_frame:
+ /* duplicates frame if needed */
+ for (i = 0; i < nb_frames; i++) {
av_init_packet(&pkt);
pkt.data = NULL;
pkt.size = 0;
@@ -1874,9 +1874,7 @@ duplicate_frame:
* flush, we need to limit them here, before they go into encoder.
*/
ost->frame_number++;
-
- if(--nb_frames)
- goto duplicate_frame;
+ }
if (vstats_filename && frame_size)
do_video_stats(output_files[ost->file_index]->ctx, ost, frame_size);