OSDN Git Service

rtpdec: Free depacketizers if the init function failed
authorMartin Storsjö <martin@martin.st>
Tue, 24 Feb 2015 11:18:10 +0000 (13:18 +0200)
committerMartin Storsjö <martin@martin.st>
Tue, 24 Feb 2015 21:07:39 +0000 (23:07 +0200)
commit078d43e23a7a3d64aafee8a58b380d3e139b3020
tree48429645f5c20aecd67571e8d4b9b1902c0e1cc4
parentbb4a310bb85f43e62240145a656b1e5285b14239
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>
libavformat/rdt.c
libavformat/rtpdec.h
libavformat/rtpdec_mpegts.c
libavformat/rtsp.c