#include "libavutil/buffer.h"
#include "libavutil/crc.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "libavutil/dict.h"
};
#define MPEGTS_OPTIONS \
- { "resync_size", "Size limit for looking up a new synchronization.", offsetof(MpegTSContext, resync_size), AV_OPT_TYPE_INT, { .i64 = MAX_RESYNC_SIZE}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }
+ { "resync_size", "set size limit for looking up a new synchronization", offsetof(MpegTSContext, resync_size), AV_OPT_TYPE_INT, { .i64 = MAX_RESYNC_SIZE}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }
static const AVOption options[] = {
MPEGTS_OPTIONS,
- {"fix_teletext_pts", "Try to fix pts values of dvb teletext streams.", offsetof(MpegTSContext, fix_teletext_pts), AV_OPT_TYPE_INT,
+ {"fix_teletext_pts", "try to fix pts values of dvb teletext streams", offsetof(MpegTSContext, fix_teletext_pts), AV_OPT_TYPE_INT,
{.i64 = 1}, 0, 1, AV_OPT_FLAG_DECODING_PARAM },
- {"ts_packetsize", "Output option carrying the raw packet size.", offsetof(MpegTSContext, raw_packet_size), AV_OPT_TYPE_INT,
+ {"ts_packetsize", "output option carrying the raw packet size", offsetof(MpegTSContext, raw_packet_size), AV_OPT_TYPE_INT,
{.i64 = 0}, 0, 0, AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_EXPORT | AV_OPT_FLAG_READONLY },
- {"scan_all_pmts", "Scan and combine all PMTs", offsetof(MpegTSContext, scan_all_pmts), AV_OPT_TYPE_INT,
+ {"scan_all_pmts", "scan and combine all PMTs", offsetof(MpegTSContext, scan_all_pmts), AV_OPT_TYPE_INT,
{ .i64 = -1}, -1, 1, AV_OPT_FLAG_DECODING_PARAM },
- {"skip_changes", "Skip changing / adding streams / programs.", offsetof(MpegTSContext, skip_changes), AV_OPT_TYPE_INT,
+ {"skip_changes", "skip changing / adding streams / programs", offsetof(MpegTSContext, skip_changes), AV_OPT_TYPE_INT,
{.i64 = 0}, 0, 1, 0 },
- {"skip_clear", "Skip clearing programs.", offsetof(MpegTSContext, skip_clear), AV_OPT_TYPE_INT,
+ {"skip_clear", "skip clearing programs", offsetof(MpegTSContext, skip_clear), AV_OPT_TYPE_INT,
{.i64 = 0}, 0, 1, 0 },
{ NULL },
};
static const AVOption raw_options[] = {
MPEGTS_OPTIONS,
- { "compute_pcr", "Compute exact PCR for each transport stream packet.",
+ { "compute_pcr", "compute exact PCR for each transport stream packet",
offsetof(MpegTSContext, mpeg2ts_compute_pcr), AV_OPT_TYPE_INT,
{ .i64 = 0 }, 0, 1, AV_OPT_FLAG_DECODING_PARAM },
- { "ts_packetsize", "Output option carrying the raw packet size.",
+ { "ts_packetsize", "output option carrying the raw packet size",
offsetof(MpegTSContext, raw_packet_size), AV_OPT_TYPE_INT,
{ .i64 = 0 }, 0, 0,
AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_EXPORT | AV_OPT_FLAG_READONLY },
{ 0xa1, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_EAC3 }, /* E-AC3 Secondary Audio */
{ 0xa2, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS }, /* DTS Express Secondary Audio */
{ 0x90, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_HDMV_PGS_SUBTITLE },
+ { 0x92, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_HDMV_TEXT_SUBTITLE },
{ 0 },
};
pes->st->request_probe = 1;
}
} else {
+ pes->pes_header_size = 6;
pes->state = MPEGTS_PAYLOAD;
pes->data_index = 0;
}
sumscore = sumscore * CHECK_COUNT / check_count;
maxscore = maxscore * CHECK_COUNT / CHECK_BLOCK;
- av_dlog(0, "TS score: %d %d\n", sumscore, maxscore);
+ ff_dlog(0, "TS score: %d %d\n", sumscore, maxscore);
if (sumscore > 6) return AVPROBE_SCORE_MAX + sumscore - CHECK_COUNT;
else if (maxscore > 6) return AVPROBE_SCORE_MAX/2 + sumscore - CHECK_COUNT;
AVIOContext *pb = s->pb;
uint8_t buf[8 * 1024] = {0};
int len;
- int64_t pos, probesize = s->probesize ? s->probesize : s->probesize2;
+ int64_t pos, probesize =
+#if FF_API_PROBESIZE_32
+ s->probesize ? s->probesize : s->probesize2;
+#else
+ s->probesize;
+#endif
if (ffio_ensure_seekback(pb, probesize) < 0)
av_log(s, AV_LOG_WARNING, "Failed to allocate buffers for seekback\n");