aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/matroskadec.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-09-29 15:14:59 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2015-09-29 15:22:52 +0200
commitb01891a9f08b9d271d75d179b3138242a958ee04 (patch)
tree6180f466be7e17e8059b3ab69a1fb5d95e776e32 /libavformat/matroskadec.c
parentd3e5fbb1406995e07fccbff3ca8c1e24f57a1f7b (diff)
parent948f3c19a8bd069768ca411212aaf8c1ed96b10d (diff)
downloadffmpeg-b01891a9f08b9d271d75d179b3138242a958ee04.tar.gz
Merge commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d'
* commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d': lavc: Make AVPacket.duration int64, and deprecate convergence_duration Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r--libavformat/matroskadec.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 7a094a6fb8..9db2b59d4e 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2777,29 +2777,15 @@ static int matroska_parse_frame(MatroskaDemuxContext *matroska,
else
pkt->pts = timecode;
pkt->pos = pos;
+ pkt->duration = lace_duration;
+
+#if FF_API_CONVERGENCE_DURATION
+FF_DISABLE_DEPRECATION_WARNINGS
if (st->codec->codec_id == AV_CODEC_ID_SUBRIP) {
- /*
- * For backward compatibility.
- * Historically, we have put subtitle duration
- * in convergence_duration, on the off chance
- * that the time_scale is less than 1us, which
- * could result in a 32bit overflow on the
- * normal duration field.
- */
pkt->convergence_duration = lace_duration;
}
-
- if (track->type != MATROSKA_TRACK_TYPE_SUBTITLE ||
- lace_duration <= INT_MAX) {
- /*
- * For non subtitle tracks, just store the duration
- * as normal.
- *
- * If it's a subtitle track and duration value does
- * not overflow a uint32, then also store it normally.
- */
- pkt->duration = lace_duration;
- }
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
dynarray_add(&matroska->packets, &matroska->num_packets, pkt);
matroska->prev_pkt = pkt;