summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gb.devel@gmail.com>2014-11-10 10:01:24 +0100
committerTim-Philipp Müller <tim@centricular.com>2014-11-15 22:23:04 +0000
commit364c5aad686a86a291180b55e9a1da570db19a71 (patch)
tree60373d4b02c37c36320c4b09a563a764ac3d8883
parent2d6908844b2607c221343b882636d6298eff5e4c (diff)
downloadgstreamer-plugins-bad-364c5aad686a86a291180b55e9a1da570db19a71.tar.gz
codecparsers: h264: fix derivation of MaxPicNum variable.
The logic to compute the MaxPicNum variable was reversed. In paricular, MaxPicNum is double MaxFrameNum only if field_pic_flag is set to 1. https://bugzilla.gnome.org/show_bug.cgi?id=739291
-rw-r--r--gst-libs/gst/codecparsers/gsth264parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst-libs/gst/codecparsers/gsth264parser.c b/gst-libs/gst/codecparsers/gsth264parser.c
index f3441983d..a396554ac 100644
--- a/gst-libs/gst/codecparsers/gsth264parser.c
+++ b/gst-libs/gst/codecparsers/gsth264parser.c
@@ -1728,9 +1728,9 @@ gst_h264_parser_parse_slice_hdr (GstH264NalParser * nalparser,
/* calculate MaxPicNum */
if (slice->field_pic_flag)
- slice->max_pic_num = sps->max_frame_num;
- else
slice->max_pic_num = 2 * sps->max_frame_num;
+ else
+ slice->max_pic_num = sps->max_frame_num;
if (nalu->idr_pic_flag)
READ_UE_ALLOWED (&nr, slice->idr_pic_id, 0, G_MAXUINT16);