]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/ncdec.c
10l trocadero: now return value of ff_rtmp_packet_read() has different meaning
[ffmpeg] / libavformat / ncdec.c
index e6cca1068b18dac5d490a81f555d73fa4d77e878..8e51f840d2b83b6a5a031f785a6d824b71862971 100644 (file)
@@ -35,7 +35,7 @@ static int nc_probe(AVProbeData *probe_packet)
     size = AV_RL16(probe_packet->buf + 5);
 
     if (size + 20 > probe_packet->buf_size)
-        return 3*AVPROBE_SCORE_MAX/2;
+        return AVPROBE_SCORE_MAX/4;
 
     if (AV_RB32(probe_packet->buf+16+size) == NC_VIDEO_FLAG)
         return AVPROBE_SCORE_MAX;
@@ -62,6 +62,7 @@ static int nc_read_header(AVFormatContext *s, AVFormatParameters *ap)
 static int nc_read_packet(AVFormatContext *s, AVPacket *pkt)
 {
     int size;
+    int ret;
 
     uint32_t state=-1;
     while (state != NC_VIDEO_FLAG) {
@@ -79,7 +80,7 @@ static int nc_read_packet(AVFormatContext *s, AVPacket *pkt)
         return AVERROR(EAGAIN);
     }
 
-    int ret = av_get_packet(s->pb, pkt, size);
+    ret = av_get_packet(s->pb, pkt, size);
     if (ret != size) {
         if (ret > 0) av_free_packet(pkt);
         return AVERROR(EIO);