Browse Source

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>
tags/n0.8
Martin Storsjö 14 years ago
parent
commit
552a99957f
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/rtpdec_qdm2.c

+ 2
- 0
libavformat/rtpdec_qdm2.c View File

@@ -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) {


Loading…
Cancel
Save