summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/pva.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/pva.c b/libavformat/pva.c
index f819b832d1..760f7fc90e 100644
--- a/libavformat/pva.c
+++ b/libavformat/pva.c
@@ -79,6 +79,10 @@ static int pva_read_packet(AVFormatContext *s, AVPacket *pkt) {
av_log(s, AV_LOG_ERROR, "invalid syncword\n");
return AVERROR(EIO);
}
+ if (streamid != PVA_VIDEO_PAYLOAD && streamid != PVA_AUDIO_PAYLOAD) {
+ av_log(s, AV_LOG_ERROR, "invalid streamid\n");
+ return AVERROR(EIO);
+ }
if (reserved != 0x55) {
av_log(s, AV_LOG_WARNING, "expected reserved byte to be 0x55\n");
}