summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2016-03-07 13:04:08 +0100
committerEdward Hervey <bilboed@bilboed.com>2016-03-09 15:18:42 +0100
commit5ebf1d477de44a45ce3a8e320a86cc3bf83c2a8e (patch)
treee0e14b8fd5ce72dde77c2d601e5be33647ae29a1 /gst-libs
parent1f32d6aff71b5183626a85e6c761a1db1c6ee07c (diff)
downloadgstreamer-plugins-bad-5ebf1d477de44a45ce3a8e320a86cc3bf83c2a8e.tar.gz
mpegvideoparser: Handle non-hierarchical profiles again
This is a regression from since mpegvideoparser was switched to use the codecparsing library. The problem is that the high bit of the profile_and_level is used to specify non-hierarchical profiles and levels. Unfortunately we were discarding that information. Expose that escape bit, and use it in the element https://bugzilla.gnome.org/show_bug.cgi?id=763220
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/codecparsers/gstmpegvideoparser.c3
-rw-r--r--gst-libs/gst/codecparsers/gstmpegvideoparser.h4
2 files changed, 6 insertions, 1 deletions
diff --git a/gst-libs/gst/codecparsers/gstmpegvideoparser.c b/gst-libs/gst/codecparsers/gstmpegvideoparser.c
index 6384105e6..debafa094 100644
--- a/gst-libs/gst/codecparsers/gstmpegvideoparser.c
+++ b/gst-libs/gst/codecparsers/gstmpegvideoparser.c
@@ -408,7 +408,8 @@ gst_mpeg_video_packet_parse_sequence_extension (const GstMpegVideoPacket *
}
/* skip profile and level escape bit */
- gst_bit_reader_skip_unchecked (&br, 1);
+ seqext->profile_level_escape_bit =
+ gst_bit_reader_get_bits_uint8_unchecked (&br, 1);
seqext->profile = gst_bit_reader_get_bits_uint8_unchecked (&br, 3);
seqext->level = gst_bit_reader_get_bits_uint8_unchecked (&br, 4);
diff --git a/gst-libs/gst/codecparsers/gstmpegvideoparser.h b/gst-libs/gst/codecparsers/gstmpegvideoparser.h
index 35f7c6fc2..1298ed78f 100644
--- a/gst-libs/gst/codecparsers/gstmpegvideoparser.h
+++ b/gst-libs/gst/codecparsers/gstmpegvideoparser.h
@@ -249,6 +249,8 @@ struct _GstMpegVideoSequenceHdr
* otherwise
* @fps_n_ext: Framerate nominator code
* @fps_d_ext: Framerate denominator code
+ * @profile_level_escape_bit: Escape bit. If set, the meaning of the
+ * @profile and @level fields is different.
*
* The Mpeg2 Video Sequence Extension structure.
**/
@@ -269,6 +271,8 @@ struct _GstMpegVideoSequenceExt
guint8 low_delay;
guint8 fps_n_ext, fps_d_ext;
+ /* Additional information */
+ guint8 profile_level_escape_bit;
};
/**