summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-27 17:05:59 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-27 17:08:40 +0100
commit3c831fba08698293034db5ecaf8d74aa5fe453f8 (patch)
tree8e42a1e32c1f1a7b547855048a809f7e5468cece
parenta76440239428190a6a5b303f0e87a7e1ae2cc881 (diff)
parente44b58924fe7b180bf8b0c277c15d1a58210a0e9 (diff)
Merge commit 'e44b58924fe7b180bf8b0c277c15d1a58210a0e9'
* commit 'e44b58924fe7b180bf8b0c277c15d1a58210a0e9': lavc: deprecate unused AVCodecContext.stream_codec_tag Conflicts: libavcodec/mpegvideo.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/avcodec.h8
-rw-r--r--libavcodec/mpegvideo.c2
-rw-r--r--libavcodec/options_table.h2
-rw-r--r--libavcodec/version.h3
4 files changed, 9 insertions, 6 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 99467bb069..5c21430ba1 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1260,13 +1260,13 @@ typedef struct AVCodecContext {
*/
unsigned int codec_tag;
+#if FF_API_STREAM_CODEC_TAG
/**
- * fourcc from the AVI stream header (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
- * This is used to work around some encoder bugs.
- * - encoding: unused
- * - decoding: Set by user, will be converted to uppercase by libavcodec during init.
+ * @deprecated this field is unused
*/
+ attribute_deprecated
unsigned int stream_codec_tag;
+#endif
void *priv_data;
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index eadca4b13e..837bd0e312 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1127,8 +1127,6 @@ void ff_mpv_decode_init(MpegEncContext *s, AVCodecContext *avctx)
/* convert fourcc to upper case */
s->codec_tag = avpriv_toupper4(avctx->codec_tag);
-
- s->stream_codec_tag = avpriv_toupper4(avctx->stream_codec_tag);
}
static int init_er(MpegEncContext *s)
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 6d6efb9044..442b21299c 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -322,7 +322,9 @@ static const AVOption avcodec_options[] = {
{"simple", "use mbcmp (default)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_SIMPLE }, INT_MIN, INT_MAX, V|E, "mbd"},
{"bits", "use fewest bits", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_BITS }, INT_MIN, INT_MAX, V|E, "mbd"},
{"rd", "use best rate distortion", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_RD }, INT_MIN, INT_MAX, V|E, "mbd"},
+#if FF_API_STREAM_CODEC_TAG
{"stream_codec_tag", NULL, OFFSET(stream_codec_tag), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},
+#endif
{"sc_threshold", "scene change threshold", OFFSET(scenechange_threshold), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
#if FF_API_MPV_OPT
{"lmin", "deprecated, use encoder private options instead", OFFSET(lmin), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, V|E},
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 7e51f3b39e..eafa12d43c 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -184,5 +184,8 @@
#ifndef FF_API_MPV_OPT
#define FF_API_MPV_OPT (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
+#ifndef FF_API_STREAM_CODEC_TAG
+#define FF_API_STREAM_CODEC_TAG (LIBAVCODEC_VERSION_MAJOR < 59)
+#endif
#endif /* AVCODEC_VERSION_H */