Commit 05b55737 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: avformat: map tx3g

parent a82ab618
...@@ -470,7 +470,7 @@ static const struct vlc_avcodec_fourcc spu_codecs[] = ...@@ -470,7 +470,7 @@ static const struct vlc_avcodec_fourcc spu_codecs[] =
{ VLC_CODEC_SUBT, AV_CODEC_ID_TEXT }, { VLC_CODEC_SUBT, AV_CODEC_ID_TEXT },
{ VLC_CODEC_XSUB, AV_CODEC_ID_XSUB }, { VLC_CODEC_XSUB, AV_CODEC_ID_XSUB },
{ VLC_CODEC_SSA, AV_CODEC_ID_SSA }, { VLC_CODEC_SSA, AV_CODEC_ID_SSA },
/* AV_CODEC_ID_MOV_TEXT */ { VLC_CODEC_TX3G, AV_CODEC_ID_MOV_TEXT },
{ VLC_CODEC_BD_PG, AV_CODEC_ID_HDMV_PGS_SUBTITLE }, { VLC_CODEC_BD_PG, AV_CODEC_ID_HDMV_PGS_SUBTITLE },
#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) #if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 100 )
{ VLC_CODEC_BD_TEXT, AV_CODEC_ID_HDMV_TEXT_SUBTITLE }, { VLC_CODEC_BD_TEXT, AV_CODEC_ID_HDMV_TEXT_SUBTITLE },
......
...@@ -498,7 +498,14 @@ int avformat_OpenDemux( vlc_object_t *p_this ) ...@@ -498,7 +498,14 @@ int avformat_OpenDemux( vlc_object_t *p_this )
es_fmt.subs.dvb.i_id = GetWBE( cp->extradata ) | es_fmt.subs.dvb.i_id = GetWBE( cp->extradata ) |
(GetWBE( cp->extradata + 2 ) << 16); (GetWBE( cp->extradata + 2 ) << 16);
} }
else if( cp->codec_id == AV_CODEC_ID_MOV_TEXT )
{
if( cp->extradata_size && (es_fmt.p_extra = malloc(cp->extradata_size)) )
{
memcpy( es_fmt.p_extra, cp->extradata, cp->extradata_size );
es_fmt.i_extra = cp->extradata_size;
}
}
psz_type = "subtitle"; psz_type = "subtitle";
break; break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment