Commit a7d5b9f1 authored by Hendrik Leppkes's avatar Hendrik Leppkes

Merge commit '84adab33'

* commit '84adab33':
  lavc: add stream-global packet side data
Merged-by: 's avatarHendrik Leppkes <h.leppkes@gmail.com>
parents 30833d12 84adab33
...@@ -14,8 +14,9 @@ libavutil: 2015-08-28 ...@@ -14,8 +14,9 @@ libavutil: 2015-08-28
API changes, most recent first: API changes, most recent first:
2015-12-17 - xxxxxxx - lavc 57.18.100 / 57.11.0 - avcodec.h 2015-12-17 - lavc 57.18.100 / 57.11.0 - avcodec.h
Add av_packet_add_side_data(). xxxxxxx - Add av_packet_add_side_data().
xxxxxxx - Add AVCodecContext.coded_side_data.
2015-12-11 - xxxxxxx - lavf 57.20.100 - avformat.h 2015-12-11 - xxxxxxx - lavf 57.20.100 - avformat.h
Add av_program_add_stream_index() Add av_program_add_stream_index()
......
...@@ -3301,6 +3301,16 @@ typedef struct AVCodecContext { ...@@ -3301,6 +3301,16 @@ typedef struct AVCodecContext {
unsigned properties; unsigned properties;
#define FF_CODEC_PROPERTY_LOSSLESS 0x00000001 #define FF_CODEC_PROPERTY_LOSSLESS 0x00000001
#define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002 #define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002
/**
* Additional data associated with the entire coded stream.
*
* - decoding: unused
* - encoding: may be set by libavcodec after avcodec_open2().
*/
AVPacketSideData *coded_side_data;
int nb_coded_side_data;
} AVCodecContext; } AVCodecContext;
AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx); AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx);
......
...@@ -2507,12 +2507,13 @@ void avsubtitle_free(AVSubtitle *sub) ...@@ -2507,12 +2507,13 @@ void avsubtitle_free(AVSubtitle *sub)
av_cold int avcodec_close(AVCodecContext *avctx) av_cold int avcodec_close(AVCodecContext *avctx)
{ {
int i;
if (!avctx) if (!avctx)
return 0; return 0;
if (avcodec_is_open(avctx)) { if (avcodec_is_open(avctx)) {
FramePool *pool = avctx->internal->pool; FramePool *pool = avctx->internal->pool;
int i;
if (CONFIG_FRAME_THREAD_ENCODER && if (CONFIG_FRAME_THREAD_ENCODER &&
avctx->internal->frame_thread_encoder && avctx->thread_count > 1) { avctx->internal->frame_thread_encoder && avctx->thread_count > 1) {
ff_frame_thread_encoder_free(avctx); ff_frame_thread_encoder_free(avctx);
...@@ -2535,6 +2536,11 @@ av_cold int avcodec_close(AVCodecContext *avctx) ...@@ -2535,6 +2536,11 @@ av_cold int avcodec_close(AVCodecContext *avctx)
av_freep(&avctx->internal); av_freep(&avctx->internal);
} }
for (i = 0; i < avctx->nb_coded_side_data; i++)
av_freep(&avctx->coded_side_data[i].data);
av_freep(&avctx->coded_side_data);
avctx->nb_coded_side_data = 0;
if (avctx->priv_data && avctx->codec && avctx->codec->priv_class) if (avctx->priv_data && avctx->codec && avctx->codec->priv_class)
av_opt_free(avctx->priv_data); av_opt_free(avctx->priv_data);
av_opt_free(avctx); av_opt_free(avctx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment