53 if(last && !memcmp(last,
"[Events]", 8))
72 int hh1, mm1, ss1, ms1;
73 int hh2, mm2, ss2, ms2;
75 p = pkt->
data + strcspn(pkt->
data,
",") + 1;
76 layer = strtol(p, &p, 10);
79 hh1 = (int)(start / 360000); mm1 = (int)(start / 6000) % 60;
80 hh2 = (int)(end / 360000); mm2 = (int)(end / 6000) % 60;
81 ss1 = (int)(start / 100) % 60; ms1 = (int)(start % 100);
82 ss2 = (int)(end / 100) % 60; ms2 = (int)(end % 100);
83 if (hh1 > 9) hh1 = 9, mm1 = 59, ss1 = 59, ms1 = 99;
84 if (hh2 > 9) hh2 = 9, mm2 = 59, ss2 = 59, ms2 = 99;
85 avio_printf(s->
pb,
"Dialogue: %ld,%d:%02d:%02d.%02d,%d:%02d:%02d.%02d,%s\r\n",
86 layer, hh1, mm1, ss1, ms1, hh2, mm2, ss2, ms2, p);
108 .mime_type =
"text/x-ssa",
109 .extensions =
"ass,ssa",
AVCodecContext * codec
Codec context associated with this stream.
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
static av_cold int end(AVCodecContext *avctx)
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void * priv_data
Format private data.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
unsigned int nb_streams
A list of all streams in the file.
main external API structure.
AVIOContext * pb
I/O context.
ASS as defined in Matroska.
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...