[FFmpeg-devel] Merge from ffmpeg 1.1.3 to 2.1.2 port for CE

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Jan 28 23:54:24 CET 2014

On Tue, Jan 28, 2014 at 09:19:26PM +0000, Hermann, Sven (SCR US) wrote:
> Hi,
> I inherited a project where we have ported a ffmpeg version to Windows CE.
> It is built in Cygwin with MinGW in a quite big process. But that just as background.
> I recently tried to port the new version (2.1.2) to this build process, and have since massive problems with my application.
> The Application is a Video Stream Player for IP Cameras. This means, I don't have to deal with encoding frames or such. My Stream (H264 and MPEG4) is tunneled through live555 and I get a callback with the frame available. Now this frame is sent to ffmpeg to decode.
> With ffmpeg 1.1.3, this worked just fine, and since I ported 2.1.2, I get an crash in a call to avcodec_decode_video2(). I tried to trace this further down. But since I am cross compiling with a terrible Cygwin and Visual Studio setup this is rather painful. However, I could trace it all the way down to decode_nal_units() in h264.c (I am debugging the H264 decoder first).
> On this level I cannot really tell anymore what is going on since I debug ffmpeg with printf() insertions (I know, terrible... but I have no way to actually debug ffmpeg on my ce device).
> I enabled all the traces for this level, and get the following:
> [h264 @ 0xaa320] Unknown NAL code: 0 (0 bits)
> [h264 @ 0xaa320] Unknown NAL code: 0 (1934 bits)

I have some doubts this is the best list, this one seems more
appropriate: https://lists.ffmpeg.org/mailman/listinfo/libav-user/
However the number of errors you get mean that the decoder almost
certainly gets broken data.
Are you sure you pass in a valid AVPacket? Either straight from avformat
or if manually created after all the necessary stuff like av_init_packet
and setting data, size and flags?
(Note that it still should not crash no matter how broken the input data,
but maybe if you find the cause of the one it will explain the other)

More information about the ffmpeg-devel mailing list