Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2012-03-16 17:08:17 +0400
committerJanne Grunau <janne-libav@jannau.net>2012-03-17 02:35:32 +0400
commit7b60799aa8ebd7115e883d8eb404061e42a59f85 (patch)
tree4994169af53cf9602e7e903ca430621eb85bcfee /libavcodec/mpegvideo.c
parent1e26a48fa23ef8e1cbc424667d387184d8155f15 (diff)
MPV: always mark dummy frames as reference
If the dummy frame are not created from a reference frame they could be deleted untimely resulting in multithreaded decoder waiting on the current frame to finish. Noticed by Ronald S. Bultje in the RV34 decoder with a broken file.
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index a239a6a294..720997fb63 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1271,6 +1271,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
return -1;
ff_thread_report_progress(&s->last_picture_ptr->f, INT_MAX, 0);
ff_thread_report_progress(&s->last_picture_ptr->f, INT_MAX, 1);
+ s->last_picture_ptr->f.reference = 3;
}
if ((s->next_picture_ptr == NULL ||
s->next_picture_ptr->f.data[0] == NULL) &&
@@ -1282,6 +1283,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
return -1;
ff_thread_report_progress(&s->next_picture_ptr->f, INT_MAX, 0);
ff_thread_report_progress(&s->next_picture_ptr->f, INT_MAX, 1);
+ s->next_picture_ptr->f.reference = 3;
}
}