diff options
author | wm4 <wm4@nowhere> | 2015-01-30 14:27:43 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-30 15:57:40 +0100 |
commit | 5f7de39942921f830377492d3db3ff53026c3987 (patch) | |
tree | 94d7e04e3b7950d8629b6f2ae6d3950127e13cc3 | |
parent | 697309fc48d6ba9495f9b71eac19cc1c0dbf9690 (diff) | |
download | mpv-5f7de39942921f830377492d3db3ff53026c3987.tar.bz2 mpv-5f7de39942921f830377492d3db3ff53026c3987.tar.xz |
av_common: add comment about using now-deprecated libavcodec field
FFmpeg and Libav have the stupid practice of replacing and deprecating
API symbols on the same day. So with FFmpeg git, this is useless and
will print a compile time warning, while it's required with all stable
releases, and might lead to decoding errors with xvid/avi (apparently).
Add a comment before someone writes a patch and I have to explain it all
over again.
-rw-r--r-- | common/av_common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/av_common.c b/common/av_common.c index 2d976bbc8d..bc2845d4d4 100644 --- a/common/av_common.c +++ b/common/av_common.c @@ -55,7 +55,6 @@ void mp_copy_lav_codec_headers(AVCodecContext *avctx, AVCodecContext *st) { mp_lavc_set_extradata(avctx, st->extradata, st->extradata_size); avctx->codec_tag = st->codec_tag; - avctx->stream_codec_tag = st->stream_codec_tag; avctx->bit_rate = st->bit_rate; avctx->width = st->width; avctx->height = st->height; @@ -67,6 +66,8 @@ void mp_copy_lav_codec_headers(AVCodecContext *avctx, AVCodecContext *st) avctx->block_align = st->block_align; avctx->channel_layout = st->channel_layout; avctx->bits_per_coded_sample = st->bits_per_coded_sample; + // Required in FFmpeg 2.5.x / Libav 11, deprecated afterwards. + avctx->stream_codec_tag = st->stream_codec_tag; } // We merely pass-through our PTS/DTS as an int64_t; libavcodec won't use it. |