[Bug 748507] mpegtsmux: set non-0 payload length in PES header if video ES packet is small enough

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Jun 5 07:11:35 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=748507

--- Comment #2 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Comment on attachment 302549
  --> https://bugzilla.gnome.org/attachment.cgi?id=302549
mpegtsmux: set non-0 payload length in PES header if video ES packet is small
enough

>Fix a bug found that pes_bytes_written is not to reset if unbounded stream.

Perhaps this bug fix should be done in a separate patch?


>     /* FIXME: As a hack, for unbounded streams, start a new PES packet for each
>      * incoming packet we receive. This assumes that incoming data is 
>-     * packetised sensibly - ie, every video frame */
>-    if (stream->cur_pes_payload_size == 0)
>+     * packetised sensibly - ie, some video frames, which have length over 16 bit */

I don't think this comment needs to be changed. What the comment says is that
the assumption is that the incoming stream is parsed. I don't see how your size
patch changes any of that or is affected by that.


>   } else if (stream->is_video_stream) {
>-    /* Unbounded for video streams */
>-    stream->cur_pes_payload_size = 0;
>-    tsmux_stream_find_pts_dts_within (stream, stream->bytes_avail, &stream->pts,
>-        &stream->dts);
>+    if (stream->bytes_avail > G_MAXUINT16) {
>+      /* Unbounded for video streams if size is over 16 bit */
>+      stream->cur_pes_payload_size = 0;

no tsmux_stream_find_pts_dts_within() needed here?

>+    } else {
>+      stream->cur_pes_payload_size = stream->bytes_avail;
>+      tsmux_stream_find_pts_dts_within (stream, stream->cur_pes_payload_size,
>+          &stream->pts, &stream->dts);
>+    }

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list