]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/idroqdec.c
avformat: add demuxer for Simon & Schuster Interactive's VAG format
[ffmpeg] / libavformat / idroqdec.c
index 8fd67a6818b37c0c0742bb57e3603100948b41a0..16aa2a146e273b7e5ab0f0901ecef767c2e45ba9 100644 (file)
@@ -59,7 +59,7 @@ typedef struct RoqDemuxContext {
 
 } RoqDemuxContext;
 
-static int roq_probe(AVProbeData *p)
+static int roq_probe(const AVProbeData *p)
 {
     if ((AV_RL16(&p->buf[0]) != RoQ_MAGIC_NUMBER) ||
         (AV_RL32(&p->buf[2]) != 0xFFFFFFFF))
@@ -205,8 +205,9 @@ static int roq_read_packet(AVFormatContext *s,
             }
 
             /* load up the packet */
-            if (av_new_packet(pkt, chunk_size + RoQ_CHUNK_PREAMBLE_SIZE))
-                return AVERROR(EIO);
+            ret = av_new_packet(pkt, chunk_size + RoQ_CHUNK_PREAMBLE_SIZE);
+            if (ret < 0)
+                return ret;
             /* copy over preamble */
             memcpy(pkt->data, preamble, RoQ_CHUNK_PREAMBLE_SIZE);