aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2014-11-23 17:30:35 +0200
committerMartin Storsjö <martin@martin.st>2014-11-24 09:23:14 +0200
commit6f26f14f134e753d6168591f30815b1c08c1498b (patch)
tree8e5ddfee85bb44455e13f4bbe32f91d29f4fa84c
parent208f3abb917757743313da0da714e525e03159d2 (diff)
downloadffmpeg-6f26f14f134e753d6168591f30815b1c08c1498b.tar.gz
sidxindex: Write mimeType=audio/mp4 for audio-only representations
This fixes playback with dash.js, when the input is one separate mp4 file per track. Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--tools/sidxindex.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/sidxindex.c b/tools/sidxindex.c
index da41d09871..62f021fd5c 100644
--- a/tools/sidxindex.c
+++ b/tools/sidxindex.c
@@ -327,7 +327,7 @@ static int output_mpd(struct Tracks *tracks, const char *filename)
for (i = 0; i < nb_tracks[set]; ) {
struct Track *first_track = adaptation_sets[set][i];
int width = 0, height = 0, sample_rate = 0, channels = 0, bitrate = 0;
- fprintf(out, "\t\t\t<Representation id=\"%d\" mimeType=\"video/mp4\" codecs=\"", i);
+ fprintf(out, "\t\t\t<Representation id=\"%d\" codecs=\"", i);
for (j = i; j < nb_tracks[set]; j++) {
struct Track *track = adaptation_sets[set][j];
if (strcmp(track->name, first_track->name))
@@ -345,7 +345,8 @@ static int output_mpd(struct Tracks *tracks, const char *filename)
fprintf(out, ",");
fprintf(out, "%s", track->codec_str);
}
- fprintf(out, "\" bandwidth=\"%d\"", bitrate);
+ fprintf(out, "\" mimeType=\"%s/mp4\" bandwidth=\"%d\"",
+ width ? "video" : "audio", bitrate);
if (width > 0 && height > 0)
fprintf(out, " width=\"%d\" height=\"%d\"", width, height);
if (sample_rate > 0)