diff --git a/subprojects/gst-plugins-bad/gst/mpegtsdemux/tsdemux.c b/subprojects/gst-plugins-bad/gst/mpegtsdemux/tsdemux.c index 9943da9118..253cc7ec55 100644 --- a/subprojects/gst-plugins-bad/gst/mpegtsdemux/tsdemux.c +++ b/subprojects/gst-plugins-bad/gst/mpegtsdemux/tsdemux.c @@ -1865,7 +1865,7 @@ create_pad_for_stream (MpegTSBase * base, MpegTSBaseStream * bstream, /* interlace-mode, sampling, depth */ gst_caps_set_simple (caps, "width", G_TYPE_INT, jpegxs.horizontal_size, "height", G_TYPE_INT, jpegxs.vertical_size, "depth", G_TYPE_INT, - (jpegxs.schar >> 4) & 0xf, NULL); + ((jpegxs.schar >> 4) & 0xf) + 1, NULL); switch (jpegxs.schar & 0xf) { case 0: gst_caps_set_simple (caps, "sampling", G_TYPE_STRING, "YCbCr-4:2:2", diff --git a/subprojects/gst-plugins-bad/gst/mpegtsmux/gstbasetsmux.c b/subprojects/gst-plugins-bad/gst/mpegtsmux/gstbasetsmux.c index 829fb9e6ef..87ce645158 100644 --- a/subprojects/gst-plugins-bad/gst/mpegtsmux/gstbasetsmux.c +++ b/subprojects/gst-plugins-bad/gst/mpegtsmux/gstbasetsmux.c @@ -525,7 +525,7 @@ gst_base_ts_mux_jpegxs_descriptor (GstBaseTsMux * mux, } { - guint16 schar = (depth & 0xf) << 4; + guint16 schar = ((depth - 1) & 0xf) << 4; /* FIXME : Support all other variants */ if (!g_strcmp0 (sampling, "YCbCr-4:2:2")) { schar |= 0;