summaryrefslogtreecommitdiff
path: root/libavformat/matroskadec.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/matroskadec.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/matroskadec.c')
-rw-r--r--libavformat/matroskadec.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 3556b14537..caf127ff20 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2335,10 +2335,14 @@ static int matroska_parse_frame(MatroskaDemuxContext *matroska,
else
pkt->pts = timecode;
pkt->pos = pos;
+ if (track->type != MATROSKA_TRACK_TYPE_SUBTITLE || st->codec->codec_id == AV_CODEC_ID_TEXT)
+ pkt->duration = duration;
+#if FF_API_CONVERGENCE_DURATION
+FF_DISABLE_DEPRECATION_WARNINGS
if (st->codec->codec_id == AV_CODEC_ID_TEXT)
pkt->convergence_duration = duration;
- else if (track->type != MATROSKA_TRACK_TYPE_SUBTITLE)
- pkt->duration = duration;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
if (st->codec->codec_id == AV_CODEC_ID_SSA)
matroska_fix_ass_packet(matroska, pkt, duration);