return st->pts.val;
}
+struct AVCodecParserContext *av_stream_get_parser(const AVStream *st)
+{
+ return st->parser;
+}
+
void av_format_inject_global_side_data(AVFormatContext *s)
{
int i;
}
/* read packet from packet buffer, if there is data */
- if (!(next_pkt->pts == AV_NOPTS_VALUE &&
+ st = s->streams[next_pkt->stream_index];
+ if (!(next_pkt->pts == AV_NOPTS_VALUE && st->discard < AVDISCARD_ALL &&
next_pkt->dts != AV_NOPTS_VALUE && !eof)) {
ret = read_from_packet_buffer(&s->packet_buffer,
&s->packet_buffer_end, pkt);
}
}
+ av_opt_set(ic, "skip_changes", "1", AV_OPT_SEARCH_CHILDREN);
/* estimate the end time (duration) */
/* XXX: may need to support wrapping */
filesize = ic->pb ? avio_size(ic->pb) : 0;
offset &&
++retry <= DURATION_MAX_RETRY);
+ av_opt_set(ic, "skip_changes", "0", AV_OPT_SEARCH_CHILDREN);
+
/* warn about audio/video streams which duration could not be estimated */
for (i = 0; i < ic->nb_streams; i++) {
st = ic->streams[i];
if (!max_analyze_duration)
max_analyze_duration = ic->max_analyze_duration;
+ av_opt_set(ic, "skip_clear", "1", AV_OPT_SEARCH_CHILDREN);
+
if (!max_analyze_duration) {
if (!strcmp(ic->iformat->name, "flv") && !(ic->ctx_flags & AVFMTCTX_NOHEADER)) {
max_analyze_duration = 10*AV_TIME_BASE;
}
}
}
+ av_opt_set(ic, "skip_clear", "0", AV_OPT_SEARCH_CHILDREN);
// close codecs which were opened in try_decode_frame()
for (i = 0; i < ic->nb_streams; i++) {