aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-24 23:11:41 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-10-26 01:15:00 +0200
commita4b705b4cbb57c1cc32d6e368e0176510ef3c2e3 (patch)
treee5a8c0649952dcca16b3760cd3fea5e62122bed3 /libavcodec
parent802c4f5231865a56dfa2723db434fa199d1a1039 (diff)
downloadffmpeg-a4b705b4cbb57c1cc32d6e368e0176510ef3c2e3.tar.gz
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) Conflicts: libavcodec/h264.c
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index d992bf2da9..ee2315849f 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2920,7 +2920,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
assert(s0->current_picture_ptr->f.reference != DELAYED_PIC_REF);
/* Mark old field/frame as completed */
- if (!last_pic_droppable && s0->current_picture_ptr->owner2 == s0) {
+ if (s0->current_picture_ptr->owner2 == s0) {
ff_thread_report_progress(&s0->current_picture_ptr->f, INT_MAX,
last_pic_structure == PICT_BOTTOM_FIELD);
}
@@ -2929,7 +2929,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
if (!FIELD_PICTURE || s->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(&s0->current_picture_ptr->f, INT_MAX,
last_pic_structure == PICT_TOP_FIELD);
}
@@ -2939,7 +2939,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(&s0->current_picture_ptr->f, INT_MAX,
last_pic_structure == PICT_TOP_FIELD);
}