Merge commit 'bb4a310bb85f43e62240145a656b1e5285b14239'

* commit 'bb4a310bb85f43e62240145a656b1e5285b14239':
  rtpdec: Don't free the payload context in the .free function

Conflicts:
	libavformat/rtpdec_latm.c
	libavformat/rtpdec_mpeg4.c
	libavformat/rtpdec_mpegts.c
	libavformat/rtpdec_xiph.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-02-25 00:25:12 +01:00
commit fa80b76b11
17 changed files with 4 additions and 21 deletions

View File

@ -554,7 +554,6 @@ rdt_free_context (PayloadContext *rdt)
avformat_close_input(&rdt->rmctx);
av_freep(&rdt->mlti_data);
av_freep(&rdt->rmst);
av_free(rdt);
}
#define RDT_HANDLER(n, s, t) \

View File

@ -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;

View File

@ -44,7 +44,6 @@ static void free_fragment(PayloadContext *data)
static void ac3_free_context(PayloadContext *data)
{
free_fragment(data);
av_free(data);
}
static int ac3_handle_packet(AVFormatContext *ctx, PayloadContext *data,

View File

@ -42,7 +42,6 @@ static void dv_free_dyn_buffer(AVIOContext **dyn_buf)
static av_cold void dv_free_context(PayloadContext *data)
{
dv_free_dyn_buffer(&data->buf);
av_free(data);
}
static av_cold int dv_sdp_parse_fmtp_config(AVFormatContext *s,

View File

@ -50,9 +50,6 @@ static av_cold void h261_free_context(PayloadContext *pl_ctx)
if (pl_ctx->buf) {
h261_free_dyn_buffer(&pl_ctx->buf);
}
/* free context */
av_free(pl_ctx);
}
static int h261_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_h261_ctx,

View File

@ -46,7 +46,6 @@ static void h263_free_context(PayloadContext *data)
avio_close_dyn_buf(data->buf, &p);
av_free(p);
}
av_free(data);
}
static int h263_handle_packet(AVFormatContext *ctx, PayloadContext *data,

View File

@ -382,8 +382,6 @@ static void h264_free_context(PayloadContext *data)
data->packet_types_received[ii], ii);
}
#endif
av_free(data);
}
static int parse_h264_sdp_line(AVFormatContext *s, int st_index,

View File

@ -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,

View File

@ -39,7 +39,6 @@ static void latm_free_context(PayloadContext *data)
av_free(p);
}
av_freep(&data->buf);
av_free(data);
}
static int latm_parse_packet(AVFormatContext *ctx, PayloadContext *data,

View File

@ -47,7 +47,6 @@ static void mpa_robust_free_context(PayloadContext *data)
{
free_fragment(data);
av_free(data->split_buf);
av_free(data);
}
static int mpa_robust_parse_rtp_header(AVFormatContext *ctx,

View File

@ -95,7 +95,6 @@ static void free_context(PayloadContext *data)
{
av_freep(&data->au_headers);
av_freep(&data->mode);
av_freep(&data);
}
static int parse_fmtp_config(AVCodecContext *codec, const char *value)

View File

@ -36,7 +36,6 @@ static void mpegts_free_context(PayloadContext *data)
return;
if (data->ts)
avpriv_mpegts_parse_close(data->ts);
av_free(data);
}
static av_cold int mpegts_init(AVFormatContext *ctx, int st_index,

View File

@ -238,7 +238,6 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
static void qt_rtp_free(PayloadContext *qt)
{
av_freep(&qt->pkt.data);
av_free(qt);
}
#define RTP_QT_HANDLER(m, n, s, t) \

View File

@ -115,7 +115,6 @@ static void svq3_extradata_free(PayloadContext *sv)
avio_close_dyn_buf(sv->pktbuf, &buf);
av_free(buf);
}
av_free(sv);
}
RTPDynamicProtocolHandler ff_svq3_dynamic_handler = {

View File

@ -278,7 +278,6 @@ static av_cold int vp8_init(AVFormatContext *s, int st_index, PayloadContext *vp
static void vp8_free_context(PayloadContext *vp8)
{
vp8_free_buffer(vp8);
av_free(vp8);
}
static int vp8_need_keyframe(PayloadContext *vp8)

View File

@ -63,7 +63,6 @@ static void xiph_free_context(PayloadContext * data)
{
free_fragment(data);
av_freep(&data->split_buf);
av_freep(&data);
}

View File

@ -732,8 +732,7 @@ void ff_rtsp_close_streams(AVFormatContext *s)
if (rtsp_st->dynamic_handler->free)
rtsp_st->dynamic_handler->free(
rtsp_st->dynamic_protocol_context);
else
av_free(rtsp_st->dynamic_protocol_context);
av_free(rtsp_st->dynamic_protocol_context);
}
for (j = 0; j < rtsp_st->nb_include_source_addrs; j++)
av_freep(&rtsp_st->include_source_addrs[j]);