aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtpdec.h
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.h
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.h')
-rw-r--r--libavformat/rtpdec.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtpdec.h b/libavformat/rtpdec.h
index 8992c38d3b..6087b7e055 100644
--- a/libavformat/rtpdec.h
+++ b/libavformat/rtpdec.h
@@ -129,7 +129,7 @@ struct RTPDynamicProtocolHandler {
PayloadContext *priv_data, const char *line);
/** Free any data needed by the rtp parsing for this dynamic data.
* Don't free the protocol_data pointer itself, that is freed by the
- * caller. */
+ * caller. This is called even if the init method failed. */
void (*free)(PayloadContext *protocol_data);
/** Parse handler for this dynamic packet */
DynamicPayloadPacketHandlerProc parse_packet;