[SCM] libav/experimental: dont assert(0) due to buggy rm demuxer

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:59:07 UTC 2013


The following commit has been merged in the experimental branch:
commit db2a0e229f352fecd7952cf44a908fec12483c9a
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Sun Apr 22 18:48:07 2007 +0000

    dont assert(0) due to buggy rm demuxer
    
    Originally committed as revision 8790 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/utils.c b/libavformat/utils.c
index ddcf09e..cb791f3 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1217,6 +1217,10 @@ int64_t av_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts, i
 #ifdef DEBUG_SEEK
 av_log(s, AV_LOG_DEBUG, "%"PRId64" %"PRId64" %"PRId64" / %"PRId64" %"PRId64" %"PRId64" target:%"PRId64" limit:%"PRId64" start:%"PRId64" noc:%d\n", pos_min, pos, pos_max, ts_min, ts, ts_max, target_ts, pos_limit, start_pos, no_change);
 #endif
+        if(ts == AV_NOPTS_VALUE){
+            av_log(s, AV_LOG_ERROR, "read_timestamp() failed in the middle\n");
+            return -1;
+        }
         assert(ts != AV_NOPTS_VALUE);
         if (target_ts <= ts) {
             pos_limit = start_pos - 1;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list