[FFmpeg-devel] [PATCH] segfault in rtp_parse_open() for MPEG TS streams
Luca Abeni
lucabe72
Thu Aug 21 16:06:55 CEST 2008
Hi Arnoud,
Arnoud Zwemmer wrote:
> Hi,
>
> Revision 14045 of libavformat/rtpdec.c introduces a segmentation fault
> for MPEG-2 TS streams that get demuxed inside the rtp demux. Comment in
> code above rtp_parse_open() explicitly states that (AVStream *) st can
> be NULL, which now causes av_set_pts_info(s->st, 32, 1, 90000); to
> segfault on the NULL ptr.
Sorry about that problem... I've never been able to test the "TS in RTP"
case; is it possible to reproduce this segfault by using the "ffmpeg"
program? If yes, how?
Your patch surely fixes the problem, but maybe there is a simpler solution:
for example, it seems to me that "st == NULL" is equivalent to
"!strcmp(ff_rtp_enc_name(payload_type), "MP2T")"
Does the attached patch work for you?
Thanks,
Luca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-ts-rtp-segfault.diff
Type: text/x-diff
Size: 874 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080821/423c18fc/attachment.diff>
More information about the ffmpeg-devel
mailing list