X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fgdv.c;h=b20691a2a49181dacbbb1005eb0d0e199ed2e2ef;hb=bc70684e74a185d7b80c8b80bdedda659cb581b8;hp=3ead383892fa8690c01991b53f2f2703f0ceda72;hpb=39278ff0de5b5e3397c22538978bffbb38ee099b;p=ffmpeg diff --git a/libavformat/gdv.c b/libavformat/gdv.c index 3ead383892f..b20691a2a49 100644 --- a/libavformat/gdv.c +++ b/libavformat/gdv.c @@ -34,7 +34,7 @@ typedef struct GDVContext { unsigned pal[256]; } GDVContext; -static int gdv_read_probe(AVProbeData *p) +static int gdv_read_probe(const AVProbeData *p) { if (AV_RL32(p->buf) == 0x29111994) return AVPROBE_SCORE_MAX; @@ -182,7 +182,6 @@ static int gdv_read_packet(AVFormatContext *ctx, AVPacket *pkt) pal = av_packet_new_side_data(pkt, AV_PKT_DATA_PALETTE, AVPALETTE_SIZE); if (!pal) { - av_packet_unref(pkt); return AVERROR(ENOMEM); } memcpy(pal, gdv->pal, AVPALETTE_SIZE); @@ -194,7 +193,7 @@ static int gdv_read_packet(AVFormatContext *ctx, AVPacket *pkt) return 0; } -AVInputFormat ff_gdv_demuxer = { +const AVInputFormat ff_gdv_demuxer = { .name = "gdv", .long_name = NULL_IF_CONFIG_SMALL("Gremlin Digital Video"), .priv_data_size = sizeof(GDVContext),