summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2016-03-28 19:02:02 +0200
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-03-31 21:20:39 +0100
commitbe8d98c1ad3872ce84139bb583919ab973208de5 (patch)
treeb4dc5cd54e45d53b7882329f94b95cfc44093979 /libavcodec/utils.c
parentdd77dad4e6ff59bb5ba888341e28ce620cc16ae0 (diff)
downloadffmpeg-be8d98c1ad3872ce84139bb583919ab973208de5.tar.gz
lavc/utils: transfer width/height for subs in codecpar
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 5288d4d6b0..cef98d7527 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -3788,6 +3788,10 @@ int avcodec_parameters_from_context(AVCodecParameters *par,
par->initial_padding = codec->initial_padding;
par->seek_preroll = codec->seek_preroll;
break;
+ case AVMEDIA_TYPE_SUBTITLE:
+ par->width = codec->width;
+ par->height = codec->height;
+ break;
}
if (codec->extradata) {
@@ -3837,6 +3841,10 @@ int avcodec_parameters_to_context(AVCodecContext *codec,
codec->initial_padding = par->initial_padding;
codec->seek_preroll = par->seek_preroll;
break;
+ case AVMEDIA_TYPE_SUBTITLE:
+ codec->width = par->width;
+ codec->height = par->height;
+ break;
}
if (par->extradata) {