pkt->pts > pkt->dts)
presentation_delayed = 1;
- av_dlog(NULL,
+ av_log(NULL, AV_LOG_TRACE,
"IN delayed:%d pts:%"PRId64", dts:%"PRId64" "
"cur_dts:%"PRId64" st:%d pc:%p\n",
presentation_delayed, pkt->pts, pkt->dts, st->cur_dts,
st->cur_dts = pkt->dts;
}
- av_dlog(NULL,
+ av_log(NULL, AV_LOG_TRACE,
"OUTdelayed:%d/%d pts:%"PRId64", dts:%"PRId64" cur_dts:%"PRId64"\n",
presentation_delayed, delay, pkt->pts, pkt->dts, st->cur_dts);
if (out_pkt.data == pkt->data && out_pkt.size == pkt->size) {
out_pkt.buf = pkt->buf;
pkt->buf = NULL;
-#if FF_API_DESTRUCT_PACKET
-FF_DISABLE_DEPRECATION_WARNINGS
- out_pkt.destruct = pkt->destruct;
- pkt->destruct = NULL;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
}
if ((ret = av_dup_packet(&out_pkt)) < 0)
goto fail;
if (stream_index < 0)
return -1;
- av_dlog(s, "read_seek: %d %"PRId64"\n", stream_index, target_ts);
+ av_log(s, AV_LOG_TRACE, "read_seek: %d %"PRId64"\n", stream_index, target_ts);
ts_max =
ts_min = AV_NOPTS_VALUE;
if (e->timestamp <= target_ts || e->pos == e->min_distance) {
pos_min = e->pos;
ts_min = e->timestamp;
- av_dlog(s, "using cached pos_min=0x%"PRIx64" dts_min=%"PRId64"\n",
+ av_log(s, AV_LOG_TRACE, "using cached pos_min=0x%"PRIx64" dts_min=%"PRId64"\n",
pos_min, ts_min);
} else {
assert(index == 0);
pos_max = e->pos;
ts_max = e->timestamp;
pos_limit = pos_max - e->min_distance;
- av_dlog(s, "using cached pos_max=0x%"PRIx64" pos_limit=0x%"PRIx64
+ av_log(s, AV_LOG_TRACE, "using cached pos_max=0x%"PRIx64" pos_limit=0x%"PRIx64
" dts_max=%"PRId64"\n", pos_max, pos_limit, ts_max);
}
}
int64_t start_pos, filesize;
int no_change;
- av_dlog(s, "gen_seek: %d %"PRId64"\n", stream_index, target_ts);
+ av_log(s, AV_LOG_TRACE, "gen_seek: %d %"PRId64"\n", stream_index, target_ts);
if (ts_min == AV_NOPTS_VALUE) {
pos_min = s->internal->data_offset;
no_change = 0;
while (pos_min < pos_limit) {
- av_dlog(s, "pos_min=0x%"PRIx64" pos_max=0x%"PRIx64" dts_min=%"PRId64
+ av_log(s, AV_LOG_TRACE, "pos_min=0x%"PRIx64" pos_max=0x%"PRIx64" dts_min=%"PRId64
" dts_max=%"PRId64"\n", pos_min, pos_max, ts_min, ts_max);
assert(pos_limit <= pos_max);
no_change++;
else
no_change = 0;
- av_dlog(s, "%"PRId64" %"PRId64" %"PRId64" / %"PRId64" %"PRId64" %"PRId64
+ av_log(s, AV_LOG_TRACE, "%"PRId64" %"PRId64" %"PRId64" / %"PRId64" %"PRId64" %"PRId64
" target:%"PRId64" limit:%"PRId64" start:%"PRId64" noc:%d\n",
pos_min, pos, pos_max, ts_min, ts, ts_max, target_ts,
pos_limit, start_pos, no_change);
ts_min = read_timestamp(s, stream_index, &pos_min, INT64_MAX);
pos_min++;
ts_max = read_timestamp(s, stream_index, &pos_min, INT64_MAX);
- av_dlog(s, "pos=0x%"PRIx64" %"PRId64"<=%"PRId64"<=%"PRId64"\n",
+ av_log(s, AV_LOG_TRACE, "pos=0x%"PRIx64" %"PRId64"<=%"PRId64"<=%"PRId64"\n",
pos, ts_min, target_ts, ts_max);
*ts_ret = ts;
return pos;
AVStream av_unused *st;
for (i = 0; i < ic->nb_streams; i++) {
st = ic->streams[i];
- av_dlog(ic, "%d: start_time: %0.3f duration: %0.3f\n", i,
+ av_log(ic, AV_LOG_TRACE, "%d: start_time: %0.3f duration: %0.3f\n", i,
(double) st->start_time / AV_TIME_BASE,
(double) st->duration / AV_TIME_BASE);
}
- av_dlog(ic,
+ av_log(ic, AV_LOG_TRACE,
"stream: start_time: %0.3f duration: %0.3f bitrate=%d kb/s\n",
(double) ic->start_time / AV_TIME_BASE,
(double) ic->duration / AV_TIME_BASE,
ret >= 0 &&
(!has_codec_parameters(st) || !has_decode_delay_been_guessed(st) ||
(!st->codec_info_nb_frames &&
- st->codec->codec->capabilities & CODEC_CAP_CHANNEL_CONF))) {
+ (st->codec->codec->capabilities & AV_CODEC_CAP_CHANNEL_CONF)))) {
got_picture = 0;
switch (st->codec->codec_type) {
case AVMEDIA_TYPE_VIDEO:
if (i > 0 && i < FF_MAX_EXTRADATA_SIZE) {
st->codec->extradata_size = i;
st->codec->extradata = av_mallocz(st->codec->extradata_size +
- FF_INPUT_BUFFER_PADDING_SIZE);
+ AV_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata)
return AVERROR(ENOMEM);
memcpy(st->codec->extradata, pkt->data,
* it takes longer and uses more memory. For MPEG-4, we need to
* decompress for QuickTime.
*
- * If CODEC_CAP_CHANNEL_CONF is set this will force decoding of at
+ * If AV_CODEC_CAP_CHANNEL_CONF is set this will force decoding of at
* least one frame of codec data, this makes sure the codec initializes
* the channel configuration and does not only trust the values from
* the container. */
AVProgram *program = NULL;
int i;
- av_dlog(ac, "new_program: id=0x%04x\n", id);
+ av_log(ac, AV_LOG_TRACE, "new_program: id=0x%04x\n", id);
for (i = 0; i < ac->nb_programs; i++)
if (ac->programs[i]->id == id)
int64_t ff_iso8601_to_unix_time(const char *datestr)
{
-#if HAVE_STRPTIME
struct tm time1 = { 0 }, time2 = { 0 };
- char *ret1, *ret2;
- ret1 = strptime(datestr, "%Y - %m - %d %T", &time1);
- ret2 = strptime(datestr, "%Y - %m - %dT%T", &time2);
+ const char *ret1, *ret2;
+ ret1 = av_small_strptime(datestr, "%Y - %m - %d %T", &time1);
+ ret2 = av_small_strptime(datestr, "%Y - %m - %dT%T", &time2);
if (ret2 && !ret1)
return av_timegm(&time2);
else
return av_timegm(&time1);
-#else
- av_log(NULL, AV_LOG_WARNING,
- "strptime() unavailable on this system, cannot convert "
- "the date string.\n");
- return 0;
-#endif
}
int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id,
av_freep(&st->codec->extradata);
st->codec->extradata_size = 0;
- st->codec->extradata = av_mallocz(size + FF_INPUT_BUFFER_PADDING_SIZE);
+ st->codec->extradata = av_mallocz(size + AV_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata)
return AVERROR(ENOMEM);