X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Filbc.c;h=d41027174db8c8b6eba92695914040a9a7853968;hb=35958782819c00211e247332ab18fbf2f28267e1;hp=50e3c3cc769d56b5bbb82e06da47087f9fb12b80;hpb=c7488f746154b5dcd70f8a3bef9a9fa5c42ac595;p=ffmpeg diff --git a/libavformat/ilbc.c b/libavformat/ilbc.c index 50e3c3cc769..d41027174db 100644 --- a/libavformat/ilbc.c +++ b/libavformat/ilbc.c @@ -49,7 +49,6 @@ static int ilbc_write_header(AVFormatContext *s) av_log(s, AV_LOG_ERROR, "Unsupported mode\n"); return AVERROR(EINVAL); } - avio_flush(pb); return 0; } @@ -59,7 +58,7 @@ static int ilbc_write_packet(AVFormatContext *s, AVPacket *pkt) return 0; } -static int ilbc_probe(AVProbeData *p) +static int ilbc_probe(const AVProbeData *p) { // Only check for "#!iLBC" which matches both formats if (!memcmp(p->buf, mode20_header, 6)) @@ -112,7 +111,6 @@ static int ilbc_read_packet(AVFormatContext *s, pkt->pos = avio_tell(s->pb); pkt->duration = par->block_align == 38 ? 160 : 240; if ((ret = avio_read(s->pb, pkt->data, par->block_align)) != par->block_align) { - av_packet_unref(pkt); return ret < 0 ? ret : AVERROR(EIO); }