summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2015-07-16 09:47:55 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-16 12:18:30 +0200
commit8dad213143e34b477f034ada4addf2ed2b1c983d (patch)
tree9bc4101735fa4a55d58003abf00f662b09d76c87 /libavcodec/utils.c
parent7aafac976fe2806c9519d4154b5f0d5b6767fbe2 (diff)
lavc: Add properties field to AVCodecContext.
The new field can hold information about losslessness and closed captions for now.
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 07017863fb..e4eb772f4c 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1293,6 +1293,11 @@ MAKE_ACCESSORS(AVCodecContext, codec, int, lowres)
MAKE_ACCESSORS(AVCodecContext, codec, int, seek_preroll)
MAKE_ACCESSORS(AVCodecContext, codec, uint16_t*, chroma_intra_matrix)
+unsigned av_codec_get_codec_properties(const AVCodecContext *codec)
+{
+ return codec->properties;
+}
+
int av_codec_get_max_lowres(const AVCodec *codec)
{
return codec->max_lowres;
@@ -3147,6 +3152,13 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
if (encode) {
snprintf(buf + strlen(buf), buf_size - strlen(buf),
", q=%d-%d", enc->qmin, enc->qmax);
+ } else {
+ if (enc->properties & FF_CODEC_PROPERTY_CLOSED_CAPTIONS)
+ snprintf(buf + strlen(buf), buf_size - strlen(buf),
+ ", Closed Captions");
+ if (enc->properties & FF_CODEC_PROPERTY_LOSSLESS)
+ snprintf(buf + strlen(buf), buf_size - strlen(buf),
+ ", lossless");
}
break;
case AVMEDIA_TYPE_AUDIO: