aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorVignesh Venkatasubramanian <vigneshv@google.com>2014-11-11 10:02:05 -0800
committerMichael Niedermayer <michaelni@gmx.at>2014-11-12 00:21:37 +0100
commit597d826123dc5fd1eb00ad1b84c7d1e1f6d8e346 (patch)
tree482f57bd00b676a47a6c6ff198d4e7fd1f60b29e /libavformat
parentdadc1f5ee9d933cca94469604a15eb3d7bc939f0 (diff)
downloadffmpeg-597d826123dc5fd1eb00ad1b84c7d1e1f6d8e346.tar.gz
lavf/webmdashenc: Representation IDs should be unique.
According to the DASH spec, Representation IDs should be unique across all adaptation sets. Fixing that and updating the fate reference file to reflect this change. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/webmdashenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/webmdashenc.c b/libavformat/webmdashenc.c
index 768b5d2383..4536b7d5a8 100644
--- a/libavformat/webmdashenc.c
+++ b/libavformat/webmdashenc.c
@@ -46,6 +46,7 @@ typedef struct WebMDashMuxContext {
char *adaptation_sets;
AdaptationSet *as;
int nb_as;
+ int representation_id;
} WebMDashMuxContext;
static const char *get_codec_name(int codec_id)
@@ -259,7 +260,7 @@ static int write_adaptation_set(AVFormatContext *s, int as_index)
avio_printf(s->pb, ">\n");
for (i = 0; i < as->nb_streams; i++) {
- write_representation(s, s->streams[as->streams[i]], i,
+ write_representation(s, s->streams[as->streams[i]], w->representation_id++,
!width_in_as, !height_in_as, !sample_rate_in_as);
}
avio_printf(s->pb, "</AdaptationSet>\n");