]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rm.c
memleak (seems ive missed that under the obfuscated indention)
[ffmpeg] / libavformat / rm.c
index 6ae996102a8ba302820f2e214a93996e5bb54491..ad2f5ff27c8b5200ad5cc112460e08ccda24bd29 100644 (file)
@@ -954,9 +954,8 @@ resync:
                 len=len2;
             rm->remaining_len-= len;
             av_get_packet(pb, pkt, len);
-        }
 
-        if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
+        } else if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
             if ((st->codec->codec_id == CODEC_ID_RA_288) ||
                 (st->codec->codec_id == CODEC_ID_COOK)) {
                 int x;
@@ -1008,7 +1007,9 @@ resync:
                 }
             } else
                 av_get_packet(pb, pkt, len);
-        }
+
+        } else
+            av_get_packet(pb, pkt, len);
 
         if(  (st->discard >= AVDISCARD_NONKEY && !(flags&2))
            || st->discard >= AVDISCARD_ALL){
@@ -1022,7 +1023,7 @@ resync:
         if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
             if(st->codec->codec_id == CODEC_ID_RV20){
                 int seq= 128*(pkt->data[2]&0x7F) + (pkt->data[3]>>1);
-                av_log(NULL, AV_LOG_DEBUG, "%d %Ld %d\n", timestamp, timestamp*512LL/25, seq);
+                av_log(NULL, AV_LOG_DEBUG, "%d %"PRId64" %d\n", timestamp, timestamp*512LL/25, seq);
 
                 seq |= (timestamp&~0x3FFF);
                 if(seq - timestamp >  0x2000) seq -= 0x4000;
@@ -1105,7 +1106,7 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index,
         }
 
         if((flags&2) && (seq&0x7F) == 1){
-//            av_log(s, AV_LOG_DEBUG, "%d %d-%d %Ld %d\n", flags, stream_index2, stream_index, dts, seq);
+//            av_log(s, AV_LOG_DEBUG, "%d %d-%d %"PRId64" %d\n", flags, stream_index2, stream_index, dts, seq);
             av_add_index_entry(st, pos, dts, 0, 0, AVINDEX_KEYFRAME);
             if(stream_index2 == stream_index)
                 break;