}
#define DURATION_MAX_READ_SIZE 250000LL
-#define DURATION_MAX_RETRY 4
+#define DURATION_MAX_RETRY 6
/* only usable for MPEG-PS streams */
static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
AVFrame *frame = av_frame_alloc();
AVSubtitle subtitle;
AVPacket pkt = *avpkt;
+ int do_skip_frame = 0;
+ enum AVDiscard skip_frame;
if (!frame)
return AVERROR(ENOMEM);
goto fail;
}
+ if (st->codec->codec->caps_internal & FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM) {
+ do_skip_frame = 1;
+ skip_frame = st->codec->skip_frame;
+ st->codec->skip_frame = AVDISCARD_ALL;
+ }
+
while ((pkt.size > 0 || (!pkt.data && got_picture)) &&
ret >= 0 &&
(!has_codec_parameters(st, NULL) || !has_decode_delay_been_guessed(st) ||
ret = -1;
fail:
+ if (do_skip_frame) {
+ st->codec->skip_frame = skip_frame;
+ }
+
av_frame_free(&frame);
return ret;
}
st->codec->time_base = st->time_base;
}
// only for the split stuff
- if (!st->parser && !(ic->flags & AVFMT_FLAG_NOPARSE)) {
+ if (!st->parser && !(ic->flags & AVFMT_FLAG_NOPARSE) && st->request_probe <= 0) {
st->parser = av_parser_init(st->codec->codec_id);
if (st->parser) {
if (st->need_parsing == AVSTREAM_PARSE_HEADERS) {
}
if (probesize)
- estimate_timings(ic, old_offset);
+ estimate_timings(ic, old_offset);
av_opt_set(ic, "skip_clear", "0", AV_OPT_SEARCH_CHILDREN);
return NULL;
}
-uint8_t *ff_stream_new_side_data(AVStream *st, enum AVPacketSideDataType type,
+uint8_t *av_stream_new_side_data(AVStream *st, enum AVPacketSideDataType type,
int size)
{
AVPacketSideData *sd, *tmp;