aboutsummaryrefslogtreecommitdiff
path: root/lib/ffmpeg/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-12 21:10:15 +0100
committerelupus <elupus@xbmc.org>2011-11-13 01:55:51 +0100
commit2ac62404c2f833d5aa64947819538ac354966ef0 (patch)
treec9f58d21909d4dcd6469269de15d97a37392d898 /lib/ffmpeg/libavcodec
parentc7882c7411fcce6b30d0bc5a4445a1d8c209e45a (diff)
h264: Use mismatching frame numbers in fields to synchronize the first/second field state independant of them being reference or not. Fixes Ticket354
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'lib/ffmpeg/libavcodec')
-rw-r--r--lib/ffmpeg/libavcodec/h264.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/ffmpeg/libavcodec/h264.c b/lib/ffmpeg/libavcodec/h264.c
index 47b007376e..87ec292655 100644
--- a/lib/ffmpeg/libavcodec/h264.c
+++ b/lib/ffmpeg/libavcodec/h264.c
@@ -1936,11 +1936,9 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
s0->first_field = FIELD_PICTURE;
} else {
- if (h->nal_ref_idc &&
- s0->current_picture_ptr->reference &&
- s0->current_picture_ptr->frame_num != h->frame_num) {
+ if (s0->current_picture_ptr->frame_num != h->frame_num) {
/*
- * This and previous field were reference, but had
+ * This and previous field had
* different frame_nums. Consider this field first in
* pair. Throw away previous field except for reference
* purposes.