aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtpdec.h
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-02-24 13:07:57 +0200
committerMartin Storsjö <martin@martin.st>2015-02-24 23:07:35 +0200
commitbb4a310bb85f43e62240145a656b1e5285b14239 (patch)
tree9f1b1e66cfa5c36737c5f203c74becd8ccb84404 /libavformat/rtpdec.h
parentf4b59334bd898c47c9ac30999a346176548630a8 (diff)
downloadffmpeg-bb4a310bb85f43e62240145a656b1e5285b14239.tar.gz
rtpdec: Don't free the payload context in the .free function
This makes it more consistent with depacketizers that don't have any .free function at all, where the payload context is freed by the surrounding framework. Always free the context in the surrounding framework, having the individual depacketizers only free any data they've specifically allocated themselves. This is similar to how this works for demuxer/muxers/codecs - a component shouldn't free the priv_data that the framework has allocated for it. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpdec.h')
-rw-r--r--libavformat/rtpdec.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/rtpdec.h b/libavformat/rtpdec.h
index 9b7c36c649..8992c38d3b 100644
--- a/libavformat/rtpdec.h
+++ b/libavformat/rtpdec.h
@@ -127,7 +127,9 @@ struct RTPDynamicProtocolHandler {
/** Parse the a= line from the sdp field */
int (*parse_sdp_a_line)(AVFormatContext *s, int st_index,
PayloadContext *priv_data, const char *line);
- /** Free any data needed by the rtp parsing for this dynamic data. */
+ /** 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. */
void (*free)(PayloadContext *protocol_data);
/** Parse handler for this dynamic packet */
DynamicPayloadPacketHandlerProc parse_packet;