[FFmpeg-cvslog] lavc: do not override format if neither text nor bitmap codec prop is set

Marton Balint git at videolan.org
Sat Jul 27 23:09:13 CEST 2013


ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sat Jul 27 21:14:44 2013 +0200| [63c0113588d61d5ed045e1937c473770453c53be] | committer: Michael Niedermayer

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 at passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=63c0113588d61d5ed045e1937c473770453c53be
---

 libavcodec/utils.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 50448b4..8464c3b 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;
         }
 



More information about the ffmpeg-cvslog mailing list