Commit 552a9995 authored by Martin Storsjö's avatar Martin Storsjö

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: 's avatarMartin Storsjö <martin@martin.st>
parent 4d7a4215
...@@ -266,6 +266,8 @@ static int qdm2_parse_packet(AVFormatContext *s, PayloadContext *qdm, ...@@ -266,6 +266,8 @@ static int qdm2_parse_packet(AVFormatContext *s, PayloadContext *qdm,
* to the decoder that it is OK to initialize. */ * to the decoder that it is OK to initialize. */
st->codec->codec_id = CODEC_ID_QDM2; st->codec->codec_id = CODEC_ID_QDM2;
} }
if (st->codec->codec_id == CODEC_ID_NONE)
return AVERROR(EAGAIN);
/* subpackets */ /* subpackets */
while (end - p >= 4) { while (end - p >= 4) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment