aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtpdec_mpegts.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-02-24 13:18:10 +0200
committerMartin Storsjö <martin@martin.st>2015-02-24 23:07:39 +0200
commit078d43e23a7a3d64aafee8a58b380d3e139b3020 (patch)
tree48429645f5c20aecd67571e8d4b9b1902c0e1cc4 /libavformat/rtpdec_mpegts.c
parentbb4a310bb85f43e62240145a656b1e5285b14239 (diff)
downloadffmpeg-078d43e23a7a3d64aafee8a58b380d3e139b3020.tar.gz
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/rtpdec_mpegts.c')
-rw-r--r--libavformat/rtpdec_mpegts.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/libavformat/rtpdec_mpegts.c b/libavformat/rtpdec_mpegts.c
index 72e11a8af2..eb88873577 100644
--- a/libavformat/rtpdec_mpegts.c
+++ b/libavformat/rtpdec_mpegts.c
@@ -60,9 +60,6 @@ static int mpegts_handle_packet(AVFormatContext *ctx, PayloadContext *data,
// different ranges.
*timestamp = RTP_NOTS_VALUE;
- if (!data->ts)
- return AVERROR(EINVAL);
-
if (!buf) {
if (data->read_buf_index >= data->read_buf_size)
return AVERROR(EAGAIN);