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:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-25 01:11:41 +0400
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-10-26 02:50:00 +0400
commitcd7d575e90ceada5a9914d029124388d4993cc9e (patch)
tree2eb22f736471b49a0ac07a18efa5ab2dcdb5a260
parent17d169ce0f0786fffa9e6d685f070bb331717950 (diff)
avcodec/h264: do not trust last_pic_droppable when marking pictures as done
This simplifies the code and fixes a deadlock Fixes Ticket2927 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 29ffeef5e73b8f41ff3a3f2242d356759c66f91f)
-rw-r--r--libavcodec/h264.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 82c243cb0a..8c64d260d5 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3461,7 +3461,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
assert(h0->cur_pic_ptr->reference != DELAYED_PIC_REF);
/* Mark old field/frame as completed */
- if (!last_pic_droppable && h0->cur_pic_ptr->tf.owner == h0->avctx) {
+ if (h0->cur_pic_ptr->tf.owner == h0->avctx) {
ff_thread_report_progress(&h0->cur_pic_ptr->tf, INT_MAX,
last_pic_structure == PICT_BOTTOM_FIELD);
}
@@ -3470,7 +3470,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
if (!FIELD_PICTURE(h) || h->picture_structure == last_pic_structure) {
/* Previous field is unmatched. Don't display it, but let it
* remain for reference if marked as such. */
- if (!last_pic_droppable && last_pic_structure != PICT_FRAME) {
+ if (last_pic_structure != PICT_FRAME) {
ff_thread_report_progress(&h0->cur_pic_ptr->tf, INT_MAX,
last_pic_structure == PICT_TOP_FIELD);
}
@@ -3480,7 +3480,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
* different frame_nums. Consider this field first in
* pair. Throw away previous field except for reference
* purposes. */
- if (!last_pic_droppable && last_pic_structure != PICT_FRAME) {
+ if (last_pic_structure != PICT_FRAME) {
ff_thread_report_progress(&h0->cur_pic_ptr->tf, INT_MAX,
last_pic_structure == PICT_TOP_FIELD);
}