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