[MPlayer-cvslog] r35124 - trunk/sub/av_sub.c
reimar
subversion at mplayerhq.hu
Mon Aug 27 22:15:39 CEST 2012
Author: reimar
Date: Mon Aug 27 22:15:39 2012
New Revision: 35124
Log:
Pass extradata to libavcodec subtitle decoder.
Modified:
trunk/sub/av_sub.c
Modified: trunk/sub/av_sub.c
==============================================================================
--- trunk/sub/av_sub.c Mon Aug 27 21:57:33 2012 (r35123)
+++ trunk/sub/av_sub.c Mon Aug 27 22:15:39 2012 (r35124)
@@ -27,6 +27,9 @@
void reset_avsub(struct sh_sub *sh)
{
if (sh->context) {
+ AVCodecContext *ctx = sh->context;
+ ctx->extradata = NULL;
+ ctx->extradata_size = 0;
avcodec_close(sh->context);
av_freep(&sh->context);
}
@@ -107,6 +110,8 @@ int decode_avsub(struct sh_sub *sh, uint
AVCodec *sub_codec;
init_avcodec();
ctx = avcodec_alloc_context3(NULL);
+ ctx->extradata_size = sh->extradata_len;
+ ctx->extradata = sh->extradata;
sub_codec = avcodec_find_decoder(cid);
if (!ctx || !sub_codec || avcodec_open2(ctx, sub_codec, NULL) < 0) {
mp_msg(MSGT_SUBREADER, MSGL_FATAL,
More information about the MPlayer-cvslog
mailing list