]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mtv.c
avfilter: Constify all AVFilters
[ffmpeg] / libavformat / mtv.c
index dcf4aa428807203440f2d0761e8d9494bca67adf..e731d91077104ffc2b76c4e61d94065d0518039b 100644 (file)
@@ -51,7 +51,7 @@ typedef struct MTVDemuxContext {
 
 } MTVDemuxContext;
 
-static int mtv_probe(AVProbeData *p)
+static int mtv_probe(const AVProbeData *p)
 {
     /* we need at least 57 bytes from the header
      * to try parsing all required fields
@@ -171,6 +171,8 @@ static int mtv_read_header(AVFormatContext *s)
     st->codecpar->width           = mtv->img_width;
     st->codecpar->height          = mtv->img_height;
     st->codecpar->extradata       = av_strdup("BottomUp");
+    if (!st->codecpar->extradata)
+        return AVERROR(ENOMEM);
     st->codecpar->extradata_size  = 9;
 
     // audio - mp3