]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/ncdec.c
hwcontext_vulkan: dynamically load functions
[ffmpeg] / libavformat / ncdec.c
index 8cadcc7cd7508f2e984063b21dd687ab349e45b6..ff5eb189bcc41cf0e9dc409755147001b178a5a5 100644 (file)
@@ -26,7 +26,7 @@
 
 #define NC_VIDEO_FLAG 0x1A5
 
-static int nc_probe(AVProbeData *probe_packet)
+static int nc_probe(const AVProbeData *probe_packet)
 {
     int size;
 
@@ -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,