X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fbit.c;h=380cbd37cdb7b706894e68f077062e4e1d0a3c1a;hb=f4df5039a791a56de85c64e6b9e4448a221b5c40;hp=76aae2d4a10ed09be24bc52e94d90c5b031990b4;hpb=aebc5b2284db1f40a5b3e2e9a2bf406f606436c7;p=ffmpeg diff --git a/libavformat/bit.c b/libavformat/bit.c index 76aae2d4a10..380cbd37cdb 100644 --- a/libavformat/bit.c +++ b/libavformat/bit.c @@ -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",