if (sys > invalid && sys * 9 <= pspack * 10)
return (audio > 12 || vid > 3 || pspack > 2) ? AVPROBE_SCORE_EXTENSION + 2
- : AVPROBE_SCORE_EXTENSION / 2 + 1; // 1 more than mp3
+ : AVPROBE_SCORE_EXTENSION / 2 + (audio + vid + pspack > 1); // 1 more than mp3
if (pspack > invalid && (priv1 + vid + audio) * 10 >= pspack * 9)
return pspack > 2 ? AVPROBE_SCORE_EXTENSION + 2
: AVPROBE_SCORE_EXTENSION / 2; // 1 more than .mpg
static int64_t get_pts(AVIOContext *pb, int c)
{
uint8_t buf[5];
+ int ret;
buf[0] = c < 0 ? avio_r8(pb) : c;
- avio_read(pb, buf + 1, 4);
+ ret = avio_read(pb, buf + 1, 4);
+ if (ret < 4)
+ return AV_NOPTS_VALUE;
return ff_parse_pes_pts(buf);
}
st->codecpar->channel_layout = AV_CH_LAYOUT_MONO;
st->codecpar->sample_rate = 8000;
}
- st->request_probe = request_probe;
+ st->internal->request_probe = request_probe;
st->need_parsing = AVSTREAM_PARSE_FULL;
found:
return dts;
}
-AVInputFormat ff_mpegps_demuxer = {
+const AVInputFormat ff_mpegps_demuxer = {
.name = "mpeg",
.long_name = NULL_IF_CONFIG_SMALL("MPEG-PS (MPEG-2 Program Stream)"),
.priv_data_size = sizeof(MpegDemuxContext),
{
int i, ret = 0, header_parsed = 0, langidx = 0;
VobSubDemuxContext *vobsub = s->priv_data;
+ const AVInputFormat *iformat;
size_t fname_len;
AVBPrint header;
int64_t delay = 0;
int stream_id = -1;
char id[64] = {0};
char alt[MAX_LINE_SIZE] = {0};
- ff_const59 AVInputFormat *iformat;
if (!vobsub->sub_name) {
char *ext;
if (tmpq->current_sub_idx >= tmpq->nb_subs)
continue;
- ts = tmpq->subs[tmpq->current_sub_idx].pts;
+ ts = tmpq->subs[tmpq->current_sub_idx]->pts;
if (ts < min_ts) {
min_ts = ts;
sid = i;
/* compute maximum packet size using the next packet position. This is
* useful when the len in the header is non-sense */
if (q->current_sub_idx < q->nb_subs) {
- psize = q->subs[q->current_sub_idx].pos - pkt->pos;
+ psize = q->subs[q->current_sub_idx]->pos - pkt->pos;
} else {
int64_t fsize = avio_size(pb);
psize = fsize < 0 ? 0xffff : fsize - pkt->pos;
.version = LIBAVUTIL_VERSION_INT,
};
-AVInputFormat ff_vobsub_demuxer = {
+const AVInputFormat ff_vobsub_demuxer = {
.name = "vobsub",
.long_name = NULL_IF_CONFIG_SMALL("VobSub subtitle format"),
.priv_data_size = sizeof(VobSubDemuxContext),