X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Ffitsdec.c;h=30e34fc4d5e0c73f7891364bb97e8be7d7460af0;hb=49cfbedb9d5a35d4701b37e9908172807eb67100;hp=4b288b3903939f01c8c4e6c25e9a50b721ae4b1a;hpb=ac4b5d86222006fa71ffe5922e1a34f1422507d8;p=ffmpeg diff --git a/libavformat/fitsdec.c b/libavformat/fitsdec.c index 4b288b39039..30e34fc4d5e 100644 --- a/libavformat/fitsdec.c +++ b/libavformat/fitsdec.c @@ -39,7 +39,7 @@ typedef struct FITSContext { int64_t pts; } FITSContext; -static int fits_probe(AVProbeData *p) +static int fits_probe(const AVProbeData *p) { const uint8_t *b = p->buf; if (!memcmp(b, "SIMPLE = T", 30)) @@ -157,11 +157,11 @@ static int fits_read_packet(AVFormatContext *s, AVPacket *pkt) av_bprint_init(&avbuf, FITS_BLOCK_SIZE, AV_BPRINT_SIZE_UNLIMITED); while ((ret = is_image(s, fits, &header, &avbuf, &size)) == 0) { + av_bprint_finalize(&avbuf, NULL); pos = avio_skip(s->pb, size); if (pos < 0) return pos; - av_bprint_finalize(&avbuf, NULL); av_bprint_init(&avbuf, FITS_BLOCK_SIZE, AV_BPRINT_SIZE_UNLIMITED); avpriv_fits_header_init(&header, STATE_XTENSION); }