Browse code

rm: Drop broken disabled cruft

Diego Biurrun authored on 2016/07/30 20:51:23
Showing 2 changed files
... ...
@@ -785,19 +785,6 @@ ff_rm_parse_packet (AVFormatContext *s, AVIOContext *pb,
785 785
 
786 786
     pkt->stream_index = st->index;
787 787
 
788
-#if 0
789
-    if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
790
-        if(st->codecpar->codec_id == AV_CODEC_ID_RV20){
791
-            int seq= 128*(pkt->data[2]&0x7F) + (pkt->data[3]>>1);
792
-            av_log(s, AV_LOG_DEBUG, "%d %"PRId64" %d\n", *timestamp, *timestamp*512LL/25, seq);
793
-
794
-            seq |= (timestamp&~0x3FFF);
795
-            if(seq - timestamp >  0x2000) seq -= 0x4000;
796
-            if(seq - timestamp < -0x2000) seq += 0x4000;
797
-        }
798
-    }
799
-#endif
800
-
801 788
     pkt->pts = timestamp;
802 789
     if (flags & 2)
803 790
         pkt->flags |= AV_PKT_FLAG_KEY;
... ...
@@ -389,7 +389,6 @@ static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size, int
389 389
 
390 390
     /* Well, I spent some time finding the meaning of these bits. I am
391 391
        not sure I understood everything, but it works !! */
392
-#if 1
393 392
     if (size > MAX_PACKET_SIZE) {
394 393
         avpriv_report_missing_feature(s, "Muxing packets larger than 64 kB");
395 394
         return AVERROR(ENOSYS);
... ...
@@ -411,13 +410,6 @@ static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size, int
411 411
         avio_wb16(pb, 0x4000 | size); /* total frame size */
412 412
         avio_wb16(pb, 0x4000 | size); /* offset from the start or the end */
413 413
     }
414
-#else
415
-    /* full frame */
416
-    write_packet_header(s, size + 6);
417
-    avio_w8(pb, 0xc0);
418
-    avio_wb16(pb, 0x4000 + size); /* total frame size */
419
-    avio_wb16(pb, 0x4000 + packet_number * 126); /* position in stream */
420
-#endif
421 414
     avio_w8(pb, stream->nb_frames & 0xff);
422 415
 
423 416
     avio_write(pb, buf, size);