aboutsummaryrefslogtreecommitdiff
path: root/libavformat/rdt.c
diff options
context:
space:
mode:
authorMartin Storsjö2015-02-24 13:18:10 +0200
committerMartin Storsjö2015-02-24 23:07:39 +0200
commit078d43e23a7a3d64aafee8a58b380d3e139b3020 (patch)
tree48429645f5c20aecd67571e8d4b9b1902c0e1cc4 /libavformat/rdt.c
parentbb4a310bb85f43e62240145a656b1e5285b14239 (diff)
rtpdec: Free depacketizers if the init function failed
This is different from how it is handled in codecs/demuxers/muxers though (where the close function isn't called if the open function failed), but since the number of depacketizers that have an .init function is quite limited, this is easy to change. The main point is that if the init function failed, we shouldn't try to use that depacketizer at all - this makes sure that the parse function doesn't need to check for the things that were initialized in the init function. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rdt.c')
-rw-r--r--libavformat/rdt.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/libavformat/rdt.c b/libavformat/rdt.c
index 2574496d2f..96b9eeb4c5 100644
--- a/libavformat/rdt.c
+++ b/libavformat/rdt.c
@@ -298,9 +298,6 @@ rdt_parse_packet (AVFormatContext *ctx, PayloadContext *rdt, AVStream *st,
int seq = 1, res;
AVIOContext pb;
- if (!rdt->rmctx)
- return AVERROR(EINVAL);
-
if (rdt->audio_pkt_cnt == 0) {
int pos;