Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-04 04:35:17 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-01-04 04:36:06 +0400
commit4a055f91bec2f746517ec7757e2b2a3bbdb90027 (patch)
tree7f3b3f15f392a8448414cd571fdc19de80e41952 /libavformat/pmpdec.c
parent3929c17405e010896e56b7791084ffd9fcee3a3d (diff)
parent1b5d065ca722eb8028c7a08e054b6da3419faf5d (diff)
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>
Diffstat (limited to 'libavformat/pmpdec.c')
-rw-r--r--libavformat/pmpdec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/pmpdec.c b/libavformat/pmpdec.c
index 71f450e9d3..25a5c3e684 100644
--- a/libavformat/pmpdec.c
+++ b/libavformat/pmpdec.c
@@ -138,10 +138,12 @@ 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) {
- avpriv_request_sample(s, "0 audio packets");
- return AVERROR_PATCHWELCOME;
+ 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;