diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2021-08-18 11:14:37 -0400 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-08-18 18:02:00 +0000 |
commit | 0a6a8e3869dac3cdcf6e705e3604c58c6e3cbe1f (patch) | |
tree | 9e355072dcf3ab64b53a0f165cf167a3bc9466d7 /sys | |
parent | 5c5083586d088605964c06f5b5509d5fa1c7c087 (diff) | |
download | gstreamer-plugins-bad-0a6a8e3869dac3cdcf6e705e3604c58c6e3cbe1f.tar.gz |
v4l2slh264dec: Fix slice header bit size calculation
The emulation bytes need to be removed as bytes, not bit. This fixes
decoding issues with files that have emulation bytes with the Cedrus
driver.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2471>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/v4l2codecs/gstv4l2codech264dec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/v4l2codecs/gstv4l2codech264dec.c b/sys/v4l2codecs/gstv4l2codech264dec.c index 7804b8788..3004e679d 100644 --- a/sys/v4l2codecs/gstv4l2codech264dec.c +++ b/sys/v4l2codecs/gstv4l2codech264dec.c @@ -652,8 +652,8 @@ gst_v4l2_codec_h264_dec_fill_pred_weight (GstV4l2CodecH264Dec * self, static guint get_slice_header_bit_size (GstH264Slice * slice) { - return 8 * slice->nalu.header_bytes - + slice->header.header_size - slice->header.n_emulation_prevention_bytes; + return 8 * slice->nalu.header_bytes + slice->header.header_size + - 8 * slice->header.n_emulation_prevention_bytes; } static void |