]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/dfa.c
avformat: Constify all muxer/demuxers
[ffmpeg] / libavformat / dfa.c
index d667cd6277a74fc2d2ae38b79df7e3fa7e625d01..9808c9b617c4591bfe28753785c860f98cb7e8a1 100644 (file)
@@ -93,7 +93,6 @@ static int dfa_read_packet(AVFormatContext *s, AVPacket *pkt)
         if (!first) {
             ret = av_append_packet(pb, pkt, 12);
             if (ret < 0) {
-                av_packet_unref(pkt);
                 return ret;
             }
         } else
@@ -101,7 +100,6 @@ static int dfa_read_packet(AVFormatContext *s, AVPacket *pkt)
         frame_size = AV_RL32(pkt->data + pkt->size - 8);
         if (frame_size > INT_MAX - 4) {
             av_log(s, AV_LOG_ERROR, "Too large chunk size: %"PRIu32"\n", frame_size);
-            av_packet_unref(pkt);
             return AVERROR(EIO);
         }
         if (AV_RL32(pkt->data + pkt->size - 12) == MKTAG('E', 'O', 'F', 'R')) {
@@ -115,7 +113,6 @@ static int dfa_read_packet(AVFormatContext *s, AVPacket *pkt)
         }
         ret = av_append_packet(pb, pkt, frame_size);
         if (ret < 0) {
-            av_packet_unref(pkt);
             return ret;
         }
     }
@@ -123,7 +120,7 @@ static int dfa_read_packet(AVFormatContext *s, AVPacket *pkt)
     return 0;
 }
 
-AVInputFormat ff_dfa_demuxer = {
+const AVInputFormat ff_dfa_demuxer = {
     .name           = "dfa",
     .long_name      = NULL_IF_CONFIG_SMALL("Chronomaster DFA"),
     .read_probe     = dfa_probe,