diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-04-13 19:20:17 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-15 02:37:40 +0200 |
commit | ef818d8bf07b0d05fcede6394a6fdc624890f2d0 (patch) | |
tree | 4db6fe9536ea60045eee1da594d9e68741bf2edc /libavformat/avformat.h | |
parent | 2adcd15f2e02e240b31353285f9336a4cbab8274 (diff) | |
download | ffmpeg-ef818d8bf07b0d05fcede6394a6fdc624890f2d0.tar.gz |
avformat: add av_format_inject_global_side_data(), and disable it by default
After this commit applications needs to call av_format_inject_global_side_data()
or handle AVStream side data by some other means if they want it not to be lost.
This fixes a API incompatibility with libav.
libav API does not allow the data to be passed through AVPackets
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index ebebb3fb6e..a1185cafcb 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -862,6 +862,8 @@ typedef struct AVStream { * - muxing: May be set by the caller before avformat_write_header(). * * Freed by libavformat in avformat_free_context(). + * + * @see av_format_inject_global_side_data() */ AVPacketSideData *side_data; /** @@ -1043,7 +1045,7 @@ typedef struct AVStream { /** * Internal data to inject global side data */ - int global_side_data_injected; + int inject_global_side_data; } AVStream; @@ -1613,6 +1615,12 @@ av_format_control_message av_format_get_control_message_cb(const AVFormatContext void av_format_set_control_message_cb(AVFormatContext *s, av_format_control_message callback); /** + * This function will cause global side data to be injected in the next packet + * of each stream as well as after any subsequent seek. + */ +void av_format_inject_global_side_data(AVFormatContext *s); + +/** * Returns the method used to set ctx->duration. * * @return AVFMT_DURATION_FROM_PTS, AVFMT_DURATION_FROM_STREAM, or AVFMT_DURATION_FROM_BITRATE. |