[x264-devel] [PATCH] Fix NAL size header for MP4/etc when producing AVC-Intra

Sebastian Dröge slomo at coaxion.net
Mon Dec 21 15:42:13 CET 2015


On Mo, 2015-12-21 at 00:30 +0300, BugMaster wrote:
> On Thu, 10 Dec 2015 17:53:16 +0200, Sebastian Dröge wrote:
> > From: Sebastian Dröge <sebastian at centricular.com>
> 
> > AVC-Intra has custom padding that is applied in a few places after
> > the NAL
> > size header is written. This causes the NAL size header to be too
> > small,
> > causing a decoder to find just zero bytes after the previous NAL
> > and then
> > failing as there's no good way to find the start of the next NAL.
> 
> ...
> 
> Hi. I hope it is OK if we change it to something like in the
> attachment.

Sure, I tried to keep the changes as minimal as possible.

Just not sure if the memset() in x264_encoder_frame_end() is still
correct now. Now it's on h->out.nal[h->out.i_nal-1].p_payload, before
it was on h->out.nal[0].p_payload.

Everything else looks equivalent.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20151221/3ba7ea3b/attachment.sig>


More information about the x264-devel mailing list