1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

rtpdec_xiph: Drop RTP packets that come in without a prior fragment start marker.

This can avoid segfaults in some cases.

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 24537 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Josh Allmann 2010-07-27 08:16:03 +00:00 committed by Martin Storsjö
parent 4db40efa47
commit adc03a3406

View File

@ -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);