aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-05-12 22:47:53 +0300
committerMartin Storsjö <martin@martin.st>2011-05-13 00:20:59 +0300
commit552a99957f7c6f6ed13795caee7ab7b9deb5d76e (patch)
treedb7e761dfd93c98dd4511c8971c01bbf29238659 /libavformat
parent4d7a4215748e8dc3740dfe6be4070ce055df6023 (diff)
downloadffmpeg-552a99957f7c6f6ed13795caee7ab7b9deb5d76e.tar.gz
rtpdec_qdm2: Don't try to parse data packet if no configuration is received
The later parsing of payload data depends on the configuration being present. If it hasn't been configured properly yet, parsing a data packet may lead to a crash. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/rtpdec_qdm2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rtpdec_qdm2.c b/libavformat/rtpdec_qdm2.c
index 7f5f0771bc..66dd874003 100644
--- a/libavformat/rtpdec_qdm2.c
+++ b/libavformat/rtpdec_qdm2.c
@@ -266,6 +266,8 @@ static int qdm2_parse_packet(AVFormatContext *s, PayloadContext *qdm,
* to the decoder that it is OK to initialize. */
st->codec->codec_id = CODEC_ID_QDM2;
}
+ if (st->codec->codec_id == CODEC_ID_NONE)
+ return AVERROR(EAGAIN);
/* subpackets */
while (end - p >= 4) {