[FFmpeg-devel] [PATCH] lavf/matroskaenc: Fix Cues on Audio for WebM DASH

Vignesh Venkatasubramanian vigneshv at google.com
Fri Jun 6 20:26:11 CEST 2014


Fix a change that was broken by [1]. Cues must be added for audio frames
on cluster start for WebM when the DASH flag is passed. Restoring
correct functionality.

[1] http://goo.gl/xYLq7Z

Signed-off-by: Vignesh Venkatasubramanian <vigneshv at google.com>
---
 libavformat/matroskaenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 3f88346..7cd418a 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1646,7 +1646,7 @@ static int mkv_write_packet_internal(AVFormatContext *s, AVPacket *pkt, int add_
 
     if (codec->codec_type != AVMEDIA_TYPE_SUBTITLE) {
         mkv_write_block(s, pb, MATROSKA_ID_SIMPLEBLOCK, pkt, keyframe << 7);
-        if (codec->codec_type == AVMEDIA_TYPE_VIDEO && keyframe) {
+        if (codec->codec_type == AVMEDIA_TYPE_VIDEO && keyframe || add_cue) {
             ret = mkv_add_cuepoint(mkv->cues, pkt->stream_index, dash_tracknum, ts, mkv->cluster_pos, relative_packet_pos, -1);
             if (ret < 0) return ret;
         }
-- 
2.0.0.526.g5318336



More information about the ffmpeg-devel mailing list