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

Michael Niedermayer michaelni
Thu Jul 16 03:29:04 CEST 2009


On Tue, Jun 23, 2009 at 03:19:43PM +0200, Gil Pedersen wrote:
> 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.

IMHO avctx should not be NULL

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090716/c10fe47d/attachment.pgp>



More information about the ffmpeg-devel mailing list