summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2015-09-26 18:13:55 +0200
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-09-29 14:33:00 +0200
commit948f3c19a8bd069768ca411212aaf8c1ed96b10d (patch)
tree159e78bd8057aa0d7ff10fac4577ce8bb5170576 /libavformat/utils.c
parentd00bb8addccb63fa3feacb06d2a310731dc0113b (diff)
lavc: Make AVPacket.duration int64, and deprecate convergence_duration
Note that convergence_duration had another meaning, one which was in practice never used. The only real use for it was a 64 bit replacement for the duration field. It's better just to make duration 64 bits, and to get rid of it. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 5d4ec626de..f8926bdc64 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -735,8 +735,12 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
/* update flags */
if (is_intra_only(st->codec->codec_id))
pkt->flags |= AV_PKT_FLAG_KEY;
+#if FF_API_CONVERGENCE_DURATION
+FF_DISABLE_DEPRECATION_WARNINGS
if (pc)
pkt->convergence_duration = pc->convergence_duration;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
}
static void free_packet_buffer(AVPacketList **pkt_buf, AVPacketList **pkt_buf_end)
@@ -906,7 +910,7 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
if (s->debug & FF_FDEBUG_TS)
av_log(s, AV_LOG_DEBUG,
"ff_read_packet stream=%d, pts=%"PRId64", dts=%"PRId64", "
- "size=%d, duration=%d, flags=%d\n",
+ "size=%d, duration=%"PRId64", flags=%d\n",
cur_pkt.stream_index, cur_pkt.pts, cur_pkt.dts,
cur_pkt.size, cur_pkt.duration, cur_pkt.flags);
@@ -955,7 +959,7 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
if (s->debug & FF_FDEBUG_TS)
av_log(s, AV_LOG_DEBUG,
"read_frame_internal stream=%d, pts=%"PRId64", dts=%"PRId64", "
- "size=%d, duration=%d, flags=%d\n",
+ "size=%d, duration=%"PRId64", flags=%d\n",
pkt->stream_index, pkt->pts, pkt->dts,
pkt->size, pkt->duration, pkt->flags);