]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/oggdec.c
avcodec: Remove deprecated old aliases for NVENC encoders
[ffmpeg] / libavformat / oggdec.c
index 9eb45499c6226028085c096ffd224aa4440b9243..a456c3df60234656ef23fde54295bb9fac52d859 100644 (file)
@@ -226,9 +226,10 @@ static int ogg_replace_stream(AVFormatContext *s, uint32_t serial, char *magic,
         return AVERROR_INVALIDDATA;
     }
 
-    /* We only have a single stream anyway, so if there's a new stream with
-     * a different codec just replace it */
     os = &ogg->streams[0];
+    if (os->codec != codec)
+        return AVERROR(EINVAL);
+
     os->serial  = serial;
     os->codec   = codec;
     os->serial  = serial;