[FFmpeg-devel] [PATCH] H.264 parser segfault fix

Gil Pedersen ffmpeg
Tue Jun 23 15:19:43 CEST 2009


Small fix for an issue I encountered while trying to receive an H.264  
RTSP stream.

MPlayer (r29378) will call the h264_parse() function with avctx=NULL  
(demux_rtp.cpp:563). This works for standard NALs, but SPS, PPS and  
SEI NAL units cause the parser to call into the regular H.264 code,  
which expects that avctx!=NULL, thus resulting in a segfault.

I'm not aware if this is caused by incorrect usage of the parser  
function from MPlayer, or in fact an libavcodec bug. Considering that  
the avctx is in all but one case only used for debugging, I'd say use  
the supplied patch. If that is not acceptable I'll have to look at  
MPlayers RTP demuxing code, which already seems a bit messy using a  
global to store state.

Best Regards,
Gil Pedersen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: h264_parser_fix.patch
Type: application/octet-stream
Size: 3877 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090623/9aabdd22/attachment.obj>
-------------- next part --------------




More information about the ffmpeg-devel mailing list