diff options
author | Frank Galligan <frankgalligan@gmail.com> | 2014-10-09 08:28:00 -0700 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-09 21:50:48 +0200 |
commit | 241b306b1eaa1be843e496653ed8e03b25dbe118 (patch) | |
tree | 9069a5cfb3c17c359273354c1a212c663942f522 | |
parent | 0c0694931442ef9ea91eace120e0629e0ac01b76 (diff) | |
download | ffmpeg-241b306b1eaa1be843e496653ed8e03b25dbe118.tar.gz |
Fix writing first audio Cues in dash mode.
In dahsmode Matroska is not writing the first Cluster for every
audio stream in the Cues element.
Signed-off-by: Frank Galligan <frankgalligan@gmail.com>
Reviewed-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/matroskaenc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 4af2d6eb97..00a0c18fda 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1770,7 +1770,8 @@ static int mkv_write_packet(AVFormatContext *s, AVPacket *pkt) // on seeing key frames. start_new_cluster = keyframe; } else if (mkv->is_dash && codec_type == AVMEDIA_TYPE_AUDIO && - cluster_time > mkv->cluster_time_limit) { + (mkv->cluster_pos == -1 || + cluster_time > mkv->cluster_time_limit)) { // For DASH audio, we create a Cluster based on cluster_time_limit start_new_cluster = 1; } else if (!mkv->is_dash && |