44 "SRT supports only a single subtitles stream.\n");
50 "Unsupported subtitles codec: %s\n",
65 int size, x1 = -1, y1 = -1, x2 = -1, y2 = -1;
69 if (p && size == 16) {
81 "Insufficient timestamps in event number %d.\n", srt->
index);
85 avio_printf(avf->
pb,
"%d\n%02d:%02d:%02d,%03d --> %02d:%02d:%02d,%03d",
87 (
int)(s / 3600000), (
int)(s / 60000) % 60,
88 (
int)(s / 1000) % 60, (
int)(s % 1000),
89 (
int)(e / 3600000), (
int)(e / 60000) % 60,
90 (
int)(e / 1000) % 60, (
int)(e % 1000));
105 .mime_type =
"application/x-subrip",
#define AV_LOG_WARNING
Something somehow does not look correct.
AVStream ** streams
A list of all streams in the file.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
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.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
int64_t convergence_duration
Time difference in AVStream->time_base units from the pts of this packet to the point at which the ou...
AVCodecContext * codec
Codec context associated with this stream.
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
const char * avcodec_get_name(enum AVCodecID id)
Get the name of a codec.
enum AVMediaType codec_type
AVIOContext * pb
I/O context.
void * priv_data
Format private data.
static void write_header(FFV1Context *f)
uint8_t * av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int *size)
Get side information from packet.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
This structure stores compressed data.
static int write_packet(AVFormatContext *s1, AVPacket *pkt)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
#define AV_NOPTS_VALUE
Undefined timestamp value.
int avio_printf(AVIOContext *s, const char *fmt,...) av_printf_format(2