[FFmpeg-devel] [PATCH 1/2] matroskadec: Write duration into packet for TEXT subtitles.

Philip Langdale philipl at overt.org
Wed May 23 07:10:19 CEST 2012

I can't see any reason to write the convergence duration instead.
These subtitle packets are the moral equivalent of keyframes, and
while the documentation says it should be used for 'some types of
subtitles', I don't see how Matroska text subtitles fall into that

Signed-off-by: Philip Langdale <philipl at overt.org>
 libavformat/matroskadec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index e8f70f9..9bb0700 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2078,7 +2078,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
                     pkt->pts = timecode;
                 pkt->pos = pos;
                 if (st->codec->codec_id == CODEC_ID_TEXT)
-                    pkt->convergence_duration = duration;
+                    pkt->duration = duration;
                 else if (track->type != MATROSKA_TRACK_TYPE_SUBTITLE)
                     pkt->duration = duration;

More information about the ffmpeg-devel mailing list