[FFmpeg-devel] [PATCH] Fix mpegtsenc's choking on first H264 start code
Fri Sep 10 13:57:40 CEST 2010
It turns out that when muxing an H264 bitstream, mpegts_write_packet has a
very crude check on AnnexB start codes. Specifically, it wants a 4-byte
00000001, disallowing the 3-byte 000001 which is also valid and occurs on
the first NALU. As a consequence, ffmpeg is currently unable to mux H264
ffmpeg -f h264 -i a.264 -vcodec copy -f mpegts -y a.ts
[mpegts @ 0xa11cb80]h264 bitstream malformated, no startcode found, use -vbsf h264_mp4toannexb
The attached patch restores correct behavior, by also allowing the 3-byte
start code, making the above command line work.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 704 bytes
Desc: not available
More information about the ffmpeg-devel