aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Raento <mika.raento@elisa.fi>2014-09-03 09:13:46 +0300
committerMartin Storsjö <martin@martin.st>2014-09-03 12:06:40 +0300
commitc487972ed0e1eaebdbe4a13cdd191e119be0b19c (patch)
tree10a98744b728f8495260792f773635c1fb8ebd0f
parent95e177eeb21f3e968aa9353bc69d1946966cc835 (diff)
downloadffmpeg-c487972ed0e1eaebdbe4a13cdd191e119be0b19c.tar.gz
ismindex: recover from completely empty streams
This creates best-effort results from input that is missing stream contents, there are warnings printed when this happens. Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--tools/ismindex.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/ismindex.c b/tools/ismindex.c
index f49916ae03..a6a9763beb 100644
--- a/tools/ismindex.c
+++ b/tools/ismindex.c
@@ -325,6 +325,12 @@ static int handle_file(struct Tracks *tracks, const char *file, int split,
for (i = 0; i < ctx->nb_streams; i++) {
struct Track **temp;
AVStream *st = ctx->streams[i];
+
+ if (st->codec->bit_rate == 0) {
+ fprintf(stderr, "Skipping track %d in %s as it has zero bitrate\n", i, file);
+ continue;
+ }
+
track = av_mallocz(sizeof(*track));
if (!track) {
err = AVERROR(ENOMEM);