if (fmt_id_type[i].type != AVMEDIA_TYPE_AUDIO &&
st->codecpar->sample_rate)
continue;
- if (st->request_probe > score &&
+ if (st->internal->request_probe > score &&
st->codecpar->codec_id != fmt_id_type[i].id)
continue;
st->codecpar->codec_id = fmt_id_type[i].id;
static int probe_codec(AVFormatContext *s, AVStream *st, const AVPacket *pkt)
{
- if (st->request_probe>0) {
+ if (st->internal->request_probe>0) {
AVProbeData *pd = &st->probe_data;
int end;
av_log(s, AV_LOG_DEBUG, "probing stream %d pp:%d\n", st->index, st->probe_packets);
|| end) {
pd->buf_size = 0;
av_freep(&pd->buf);
- st->request_probe = -1;
+ st->internal->request_probe = -1;
if (st->codecpar->codec_id != AV_CODEC_ID_NONE) {
av_log(s, AV_LOG_DEBUG, "probed stream %d\n", st->index);
} else
if (s->internal->raw_packet_buffer_remaining_size <= 0)
if ((err = probe_codec(s, st, NULL)) < 0)
return err;
- if (st->request_probe <= 0) {
+ if (st->internal->request_probe <= 0) {
avpriv_packet_list_get(&s->internal->raw_packet_buffer,
&s->internal->raw_packet_buffer_end, pkt);
s->internal->raw_packet_buffer_remaining_size += pkt->size;
return ret;
for (i = 0; i < s->nb_streams; i++) {
st = s->streams[i];
- if (st->probe_packets || st->request_probe > 0)
+ if (st->probe_packets || st->internal->request_probe > 0)
if ((err = probe_codec(s, st, NULL)) < 0)
return err;
- av_assert0(st->request_probe <= 0);
+ av_assert0(st->internal->request_probe <= 0);
}
continue;
}
if (s->use_wallclock_as_timestamps)
pkt->dts = pkt->pts = av_rescale_q(av_gettime(), AV_TIME_BASE_Q, st->time_base);
- if (!pktl && st->request_probe <= 0)
+ if (!pktl && st->internal->request_probe <= 0)
return ret;
err = avpriv_packet_list_put(&s->internal->raw_packet_buffer,
av_packet_unref(pkt);
}
if (pkt->flags & AV_PKT_FLAG_KEY)
- st->skip_to_keyframe = 0;
- if (st->skip_to_keyframe) {
+ st->internal->skip_to_keyframe = 0;
+ if (st->internal->skip_to_keyframe) {
av_packet_unref(pkt);
got_packet = 0;
}
FF_ENABLE_DEPRECATION_WARNINGS
#endif
// only for the split stuff
- if (!st->parser && !(ic->flags & AVFMT_FLAG_NOPARSE) && st->request_probe <= 0) {
+ if (!st->parser && !(ic->flags & AVFMT_FLAG_NOPARSE) && st->internal->request_probe <= 0) {
st->parser = av_parser_init(st->codecpar->codec_id);
if (st->parser) {
if (st->need_parsing == AVSTREAM_PARSE_HEADERS) {
ret = avcodec_parameters_to_context(avctx, st->codecpar);
if (ret < 0)
goto find_stream_info_err;
- if (st->request_probe <= 0)
+ if (st->internal->request_probe <= 0)
st->internal->avctx_inited = 1;
codec = find_probe_decoder(ic, st, st->codecpar->codec_id);
}
// Try to just open decoders, in case this is enough to get parameters.
- if (!has_codec_parameters(st, NULL) && st->request_probe <= 0) {
+ if (!has_codec_parameters(st, NULL) && st->internal->request_probe <= 0) {
if (codec && !avctx->codec)
if (avcodec_open2(avctx, codec, options ? &options[i] : &thread_opt) < 0)
av_log(ic, AV_LOG_WARNING,