From bb4a310bb85f43e62240145a656b1e5285b14239 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Tue, 24 Feb 2015 13:07:57 +0200 Subject: rtpdec: Don't free the payload context in the .free function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ö --- libavformat/rtpdec_jpeg.c | 1 - 1 file changed, 1 deletion(-) (limited to 'libavformat/rtpdec_jpeg.c') diff --git a/libavformat/rtpdec_jpeg.c b/libavformat/rtpdec_jpeg.c index b49185a751..0bc9eea13c 100644 --- a/libavformat/rtpdec_jpeg.c +++ b/libavformat/rtpdec_jpeg.c @@ -72,7 +72,6 @@ static void free_frame(PayloadContext *jpeg) static void jpeg_free_context(PayloadContext *jpeg) { free_frame(jpeg); - av_free(jpeg); } static int jpeg_create_huffman_table(PutByteContext *p, int table_class, -- cgit v1.2.3