X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fc93.c;h=9ecf1427a9ea07317ef9268b3c8846aab412561b;hb=29f5c1e51b0d156f4650b96ab56c07727fe9a9b7;hp=8aa80b5e0b1b8cbbbdd71437680c79ab4a338900;hpb=4d8875ec23cf299277a0f028ea2ac99eb6f603c9;p=ffmpeg diff --git a/libavformat/c93.c b/libavformat/c93.c index 8aa80b5e0b1..9ecf1427a9e 100644 --- a/libavformat/c93.c +++ b/libavformat/c93.c @@ -158,22 +158,19 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) ret = avio_read(pb, pkt->data + 1, datasize); if (ret < datasize) { - ret = AVERROR(EIO); - goto fail; + return AVERROR(EIO); } datasize = avio_rl16(pb); /* palette size */ if (datasize) { if (datasize != 768) { av_log(s, AV_LOG_ERROR, "invalid palette size %u\n", datasize); - ret = AVERROR_INVALIDDATA; - goto fail; + return AVERROR_INVALIDDATA; } pkt->data[0] |= C93_HAS_PALETTE; ret = avio_read(pb, pkt->data + pkt->size, datasize); if (ret < datasize) { - ret = AVERROR(EIO); - goto fail; + return AVERROR(EIO); } pkt->size += 768; } @@ -186,13 +183,9 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) pkt->data[0] |= C93_FIRST_FRAME; } return 0; - - fail: - av_packet_unref(pkt); - return ret; } -AVInputFormat ff_c93_demuxer = { +const AVInputFormat ff_c93_demuxer = { .name = "c93", .long_name = NULL_IF_CONFIG_SMALL("Interplay C93"), .priv_data_size = sizeof(C93DemuxContext),