Browse code

Merge commit '1b5d065ca722eb8028c7a08e054b6da3419faf5d'

* commit '1b5d065ca722eb8028c7a08e054b6da3419faf5d':
pmpdec: check that there is at least one audio packet.

Conflicts:
libavformat/pmpdec.c

See: 8b1cd25ca7e64e6128fa2902d78e48bfeeec9786
Merged-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2014/01/04 09:35:17
Showing 1 changed files
... ...
@@ -138,10 +138,12 @@ static int pmp_packet(AVFormatContext *s, AVPacket *pkt)
138 138
     if (pmp->cur_stream == 0) {
139 139
         int num_packets;
140 140
         pmp->audio_packets = avio_r8(pb);
141
+
141 142
         if (!pmp->audio_packets) {
142
-            avpriv_request_sample(s, "0 audio packets");
143
-            return AVERROR_PATCHWELCOME;
143
+            av_log(s, AV_LOG_ERROR, "No audio packets.\n");
144
+            return AVERROR_INVALIDDATA;
144 145
         }
146
+
145 147
         num_packets = (pmp->num_streams - 1) * pmp->audio_packets + 1;
146 148
         avio_skip(pb, 8);
147 149
         pmp->current_packet = 0;