*/
int64_t last_discard_sample;
- /**
- * Number of internally decoded frames, used internally in libavformat, do not access
- * its lifetime differs from info which is why it is not in that structure.
- */
- int nb_decoded_frames;
-
- /**
- * Timestamp offset added to timestamps before muxing
- */
- int64_t mux_ts_offset;
-
/**
* An opaque field for libavformat internal usage.
* Must not be accessed in any way by callers.
} *info;
+ /**
+ * Number of internally decoded frames, used internally in libavformat, do not access
+ * its lifetime differs from info which is why it is not in that structure.
+ */
+ int nb_decoded_frames;
+
+ /**
+ * Timestamp offset added to timestamps before muxing
+ */
+ int64_t mux_ts_offset;
+
/**
* Internal data to check for wrapping of the time stamp
*/
if (s->avoid_negative_ts > 0) {
AVStream *st = s->streams[pkt->stream_index];
- int64_t offset = st->mux_ts_offset;
+ int64_t offset = st->internal->mux_ts_offset;
int64_t ts = s->internal->avoid_negative_ts_use_pts ? pkt->pts : pkt->dts;
if (s->internal->offset == AV_NOPTS_VALUE && ts != AV_NOPTS_VALUE &&
}
if (s->internal->offset != AV_NOPTS_VALUE && !offset) {
- offset = st->mux_ts_offset =
+ offset = st->internal->mux_ts_offset =
av_rescale_q_rnd(s->internal->offset,
s->internal->offset_timebase,
st->time_base,
*pkt = pktl->pkt;
if (add_offset) {
AVStream *st = s->streams[pkt->stream_index];
- int64_t offset = st->mux_ts_offset;
+ int64_t offset = st->internal->mux_ts_offset;
if (s->output_ts_offset)
offset += av_rescale_q(s->output_ts_offset, AV_TIME_BASE_Q, st->time_base);
return 1;
#endif
if (st->internal->avctx->has_b_frames<3)
- return st->nb_decoded_frames >= 7;
+ return st->internal->nb_decoded_frames >= 7;
else if (st->internal->avctx->has_b_frames<4)
- return st->nb_decoded_frames >= 18;
+ return st->internal->nb_decoded_frames >= 18;
else
- return st->nb_decoded_frames >= 20;
+ return st->internal->nb_decoded_frames >= 20;
}
static AVPacketList *get_next_pkt(AVFormatContext *s, AVStream *st, AVPacketList *pktl)
FAIL("unspecified sample rate");
if (!avctx->channels)
FAIL("unspecified number of channels");
- if (st->internal->info->found_decoder >= 0 && !st->nb_decoded_frames && avctx->codec_id == AV_CODEC_ID_DTS)
+ if (st->internal->info->found_decoder >= 0 && !st->internal->nb_decoded_frames && avctx->codec_id == AV_CODEC_ID_DTS)
FAIL("no decodable DTS frames");
break;
case AVMEDIA_TYPE_VIDEO:
}
if (ret >= 0) {
if (got_picture)
- st->nb_decoded_frames++;
+ st->internal->nb_decoded_frames++;
ret = got_picture;
}
}