This fixes a segfault that sometimes occurs with live/broadcast streams, since the first packet we receive will not always be the start of a frame, in the case of fragmented frames. This leads to writing a null buffer.
Josh
From 308e7bc9cf86cafe14d345f9deab92f935df863a Mon Sep 17 00:00:00 2001 From: Josh Allmann <[email protected]> Date: Tue, 27 Jul 2010 00:48:47 -0700 Subject: [PATCH 1/2] Drop Xiph RTP packets that come in without a prior fragment start marker. --- libavformat/rtpdec_xiph.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/libavformat/rtpdec_xiph.c b/libavformat/rtpdec_xiph.c index 4c9cad2..306971b 100644 --- a/libavformat/rtpdec_xiph.c +++ b/libavformat/rtpdec_xiph.c @@ -172,6 +172,11 @@ static int xiph_handle_packet(AVFormatContext * ctx, av_log(ctx, AV_LOG_ERROR, "RTP timestamps don't match!\n"); return AVERROR_INVALIDDATA; } + if (!data->fragment) { + av_log(ctx, AV_LOG_WARNING, + "Received packet without a start fragment; dropping. \n"); + return AVERROR(EAGAIN); + } // copy data to fragment buffer put_buffer(data->fragment, buf, pkt_len); -- 1.7.0.4
_______________________________________________ FFmpeg-soc mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc
