[SCM] libav/experimental: rtpdec_xiph: Drop RTP packets that come in without a prior fragment start marker.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:12:48 UTC 2013


The following commit has been merged in the experimental branch:
commit adc03a34069efe13857d580e3d973121b7b8a8d3
Author: Josh Allmann <joshua.allmann at gmail.com>
Date:   Tue Jul 27 08:16:03 2010 +0000

    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

diff --git a/libavformat/rtpdec_xiph.c b/libavformat/rtpdec_xiph.c
index 4c9cad2..bcf583f 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);

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list