X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fncdec.c;h=ff5eb189bcc41cf0e9dc409755147001b178a5a5;hb=f4df5039a791a56de85c64e6b9e4448a221b5c40;hp=bc3d3e82bf5fc3dae292fc36a3ca864c11889ba6;hpb=4d8875ec23cf299277a0f028ea2ac99eb6f603c9;p=ffmpeg diff --git a/libavformat/ncdec.c b/libavformat/ncdec.c index bc3d3e82bf5..ff5eb189bcc 100644 --- a/libavformat/ncdec.c +++ b/libavformat/ncdec.c @@ -83,7 +83,6 @@ static int nc_read_packet(AVFormatContext *s, AVPacket *pkt) ret = av_get_packet(s->pb, pkt, size); if (ret != size) { - if (ret > 0) av_packet_unref(pkt); return AVERROR(EIO); } @@ -91,7 +90,7 @@ static int nc_read_packet(AVFormatContext *s, AVPacket *pkt) return size; } -AVInputFormat ff_nc_demuxer = { +const AVInputFormat ff_nc_demuxer = { .name = "nc", .long_name = NULL_IF_CONFIG_SMALL("NC camera feed"), .read_probe = nc_probe,