]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/pmpdec.c
riff: add PLV1 fourcc to mpeg4
[ffmpeg] / libavformat / pmpdec.c
index 484be43ce91b6fed87349566c788863f0f12a842..8ae147f3919a1b02b6f606bd2e39c4b40d1e0168 100644 (file)
@@ -124,6 +124,11 @@ static int pmp_packet(AVFormatContext *s, AVPacket *pkt)
     if (pmp->cur_stream == 0) {
         int num_packets;
         pmp->audio_packets = avio_r8(pb);
+        if (!pmp->audio_packets) {
+            av_log(s, AV_LOG_ERROR, "No audio packets.\n");
+            return AVERROR_INVALIDDATA;
+        }
+
         num_packets = (pmp->num_streams - 1) * pmp->audio_packets + 1;
         avio_skip(pb, 8);
         pmp->current_packet = 0;