]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/idcin.c
rtmpproto: Simplify code for copying data into the output packet
[ffmpeg] / libavformat / idcin.c
index fa9976bae6a0a8fdc106e47166b52f5bbcf631ad..3aa0e3ea501de51be5c7eb4a0a3c90c6d9de80e8 100644 (file)
@@ -137,7 +137,7 @@ static int idcin_probe(AVProbeData *p)
         return 0;
 
     /* return half certainty since this check is a bit sketchy */
-    return AVPROBE_SCORE_MAX / 2;
+    return AVPROBE_SCORE_EXTENSION;
 }
 
 static int idcin_read_header(AVFormatContext *s)
@@ -317,9 +317,9 @@ static int idcin_read_packet(AVFormatContext *s,
 
             pal = av_packet_new_side_data(pkt, AV_PKT_DATA_PALETTE,
                                           AVPALETTE_SIZE);
-            if (ret < 0) {
+            if (!pal) {
                 av_free_packet(pkt);
-                return ret;
+                return AVERROR(ENOMEM);
             }
             memcpy(pal, palette, AVPALETTE_SIZE);
             pkt->flags |= AV_PKT_FLAG_KEY;