]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/msnwc_tcp.c
crypto: consistently use size_t as type for length parameters
[ffmpeg] / libavformat / msnwc_tcp.c
index bb00c87751536559896c0bd9d8ed75cde19d6104..6b9589d916809e0cf2e779bb05c455f287d82995 100644 (file)
@@ -68,23 +68,23 @@ static int msnwc_tcp_probe(AVProbeData *p)
         }
     }
 
-    return -1;
+    return 0;
 }
 
 static int msnwc_tcp_read_header(AVFormatContext *ctx)
 {
     AVIOContext *pb = ctx->pb;
-    AVCodecContext *codec;
+    AVCodecParameters *par;
     AVStream *st;
 
     st = avformat_new_stream(ctx, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
-    codec             = st->codec;
-    codec->codec_type = AVMEDIA_TYPE_VIDEO;
-    codec->codec_id   = AV_CODEC_ID_MIMIC;
-    codec->codec_tag  = MKTAG('M', 'L', '2', '0');
+    par             = st->codecpar;
+    par->codec_type = AVMEDIA_TYPE_VIDEO;
+    par->codec_id   = AV_CODEC_ID_MIMIC;
+    par->codec_tag  = MKTAG('M', 'L', '2', '0');
 
     avpriv_set_pts_info(st, 32, 1, 1000);
 
@@ -94,7 +94,7 @@ static int msnwc_tcp_read_header(AVFormatContext *ctx)
 
     if (pb->eof_reached) {
         av_log(ctx, AV_LOG_ERROR, "Could not find valid start.");
-        return -1;
+        return AVERROR_INVALIDDATA;
     }
 
     return 0;