projects
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d7a421
)
rtpdec_qdm2: Don't try to parse data packet if no configuration is received
author
Martin Storsjö
<martin@martin.st>
Thu, 12 May 2011 19:47:53 +0000
(22:47 +0300)
committer
Martin Storsjö
<martin@martin.st>
Thu, 12 May 2011 21:20:59 +0000
(
00:20
+0300)
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>
libavformat/rtpdec_qdm2.c
patch
|
blob
|
blame
|
history
diff --git
a/libavformat/rtpdec_qdm2.c
b/libavformat/rtpdec_qdm2.c
index
7f5f077
..
66dd874
100644
(file)
--- 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) {