CODEC_ID_DVB_SUBTITLE,
CODEC_ID_TEXT, ///< raw UTF-8 text
CODEC_ID_XSUB,
+ CODEC_ID_SSA,
CODEC_ID_MPEG2TS= 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS
* stream (only used by libavformat) */
{"S_TEXT/UTF8" , CODEC_ID_TEXT},
{"S_TEXT/ASCII" , CODEC_ID_TEXT},
- {"S_TEXT/ASS" , CODEC_ID_TEXT},
- {"S_TEXT/SSA" , CODEC_ID_TEXT},
- {"S_ASS" , CODEC_ID_TEXT},
- {"S_SSA" , CODEC_ID_TEXT},
+ {"S_TEXT/ASS" , CODEC_ID_SSA},
+ {"S_TEXT/SSA" , CODEC_ID_SSA},
+ {"S_ASS" , CODEC_ID_SSA},
+ {"S_SSA" , CODEC_ID_SSA},
{"S_VOBSUB" , CODEC_ID_DVD_SUBTITLE},
{NULL , CODEC_ID_NONE}
typedef struct MatroskaSubtitleTrack {
MatroskaTrack track;
-
- int ass;
//..
} MatroskaSubtitleTrack;
}
}
- else if (codec_id == CODEC_ID_TEXT) {
- MatroskaSubtitleTrack *subtrack=(MatroskaSubtitleTrack *)track;
- if (!strcmp(track->codec_id, "S_TEXT/ASS") ||
- !strcmp(track->codec_id, "S_TEXT/SSA") ||
- !strcmp(track->codec_id, "S_ASS") ||
- !strcmp(track->codec_id, "S_SSA"))
- subtrack->ass = 1;
- }
-
if (codec_id == CODEC_ID_NONE) {
av_log(matroska->ctx, AV_LOG_INFO,
"Unknown/unsupported CodecID %s.\n",
} else {
int offset = 0;
- if (st->codec->codec_id == CODEC_ID_TEXT
- && ((MatroskaSubtitleTrack *)(matroska->tracks[track]))->ass) {
- int i;
- for (i=0; i<8 && data[offset]; offset++)
- if (data[offset] == ',')
- i++;
- }
-
pkt = av_mallocz(sizeof(AVPacket));
/* XXX: prevent data copy... */
if (av_new_packet(pkt, lace_size[n]-offset) < 0) {