[Bug 664123] New: [h264parse] Conversion from AVC to byte stream fails for nal_length_size != 4

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Nov 15 08:33:42 PST 2011


https://bugzilla.gnome.org/show_bug.cgi?id=664123
  GStreamer | gst-plugins-bad | git

           Summary: [h264parse] Conversion from AVC to byte stream fails
                    for nal_length_size != 4
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-bad
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: jonas at hallerud.se
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Created an attachment (id=201455)
 View: https://bugzilla.gnome.org/attachment.cgi?id=201455
 Review: https://bugzilla.gnome.org/review?bug=664123&attachment=201455

Patch to force memcpy dst offset to 4 for avc-> byte-stream wrapping

Sample clip
http://dl.dropbox.com/u/27392332/content/3G2/H264_AAC/H264_352x240_15fps_0300kbps_AAC-HE_096kbps_44khz_ST.3g2

gst-launch filesrc
location=H264_352x240_15fps_0300kbps_AAC-HE_096kbps_44khz_ST.3g2 ! qtdemux !
h264parse ! fakesink

ERROR: from element /GstPipeline:pipeline0/GstH264Parse:h264parse0: No valid
frames found before end of stream

The reason can be found in gst_h264_parse_wrap_nal
Here a new buffer is allocated and filled with the byte-stream start code
(0x00000001), then the original buffer is memcpyd into the new buffer with
starting offset h264parse->nal_length_size.

In the sample clip and many others, nal_length_size != 4 . In this case it's 2.
That is, the last two bytes of the written start code is overwritten so later
on it can't sync to the stream. No frames are detected.

When wrapping the nal avc -> byte-stream, always write the start code and put
the nal after it regardless of nal_length_size.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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