]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/nsvdec.c
avcodec/avcodec: Use avcodec_close() on avcodec_open2() failure
[ffmpeg] / libavformat / nsvdec.c
index eb26b294508c485a0f4841e673a513a85cc38901..b79d0dcc62ecb3a09db0e733958d37bca1e78785 100644 (file)
@@ -682,10 +682,10 @@ static int nsv_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
     if(index < 0)
         return -1;
 
-    if (avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET) < 0)
+    if (avio_seek(s->pb, st->internal->index_entries[index].pos, SEEK_SET) < 0)
         return -1;
 
-    nst->frame_offset = st->index_entries[index].timestamp;
+    nst->frame_offset = st->internal->index_entries[index].timestamp;
     nsv->state = NSV_UNSYNC;
     return 0;
 }
@@ -734,7 +734,7 @@ static int nsv_probe(const AVProbeData *p)
     return score;
 }
 
-AVInputFormat ff_nsv_demuxer = {
+const AVInputFormat ff_nsv_demuxer = {
     .name           = "nsv",
     .long_name      = NULL_IF_CONFIG_SMALL("Nullsoft Streaming Video"),
     .priv_data_size = sizeof(NSVContext),