diff options
author | Marton Balint <cus@passwd.hu> | 2013-07-27 21:14:44 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-27 23:03:00 +0200 |
commit | 63c0113588d61d5ed045e1937c473770453c53be (patch) | |
tree | f0f18c7875fe9a10d36ef33a9b0d49b6aadae3ed | |
parent | 94ad38e2e8a50e8b661bd2dc40a77e91d3b79792 (diff) | |
download | ffmpeg-63c0113588d61d5ed045e1937c473770453c53be.tar.gz |
lavc: do not override format if neither text nor bitmap codec prop is set
Some decoders may output both, this way the decoder can set it.
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/utils.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 50448b4a85..8464c3b8dc 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -2337,7 +2337,10 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, av_free_packet(&pkt_recoded); } - sub->format = !(avctx->codec_descriptor->props & AV_CODEC_PROP_BITMAP_SUB); + if (avctx->codec_descriptor->props & AV_CODEC_PROP_BITMAP_SUB) + sub->format = 0; + else if (avctx->codec_descriptor->props & AV_CODEC_PROP_TEXT_SUB) + sub->format = 1; avctx->pkt = NULL; } |