]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/bit.c
avformat/avio: Add Metacube support
[ffmpeg] / libavformat / bit.c
index 76aae2d4a10ed09be24bc52e94d90c5b031990b4..380cbd37cdb7b706894e68f077062e4e1d0a3c1a 100644 (file)
@@ -30,7 +30,7 @@
 #define BIT_1      0x81
 
 #if CONFIG_BIT_DEMUXER
-static int probe(AVProbeData *p)
+static int probe(const AVProbeData *p)
 {
     int i = 0, j, valid = 0;
 
@@ -94,8 +94,8 @@ static int read_packet(AVFormatContext *s,
     if(ret != 8 * packet_size * sizeof(uint16_t))
         return AVERROR(EIO);
 
-    if (av_new_packet(pkt, packet_size) < 0)
-        return AVERROR(ENOMEM);
+    if ((ret = av_new_packet(pkt, packet_size)) < 0)
+        return ret;
 
     init_put_bits(&pbo, pkt->data, packet_size);
     for(j=0; j < packet_size; j++)
@@ -109,7 +109,7 @@ static int read_packet(AVFormatContext *s,
     return 0;
 }
 
-AVInputFormat ff_bit_demuxer = {
+const AVInputFormat ff_bit_demuxer = {
     .name        = "bit",
     .long_name   = NULL_IF_CONFIG_SMALL("G.729 BIT file format"),
     .read_probe  = probe,
@@ -155,7 +155,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
     return 0;
 }
 
-AVOutputFormat ff_bit_muxer = {
+const AVOutputFormat ff_bit_muxer = {
     .name         = "bit",
     .long_name    = NULL_IF_CONFIG_SMALL("G.729 BIT file format"),
     .mime_type    = "audio/bit",