[FFmpeg-cvslog] ismindex: recover from completely empty streams

Mika Raento git at videolan.org
Wed Sep 3 15:11:27 CEST 2014


ffmpeg | branch: master | Mika Raento <mika.raento at elisa.fi> | Wed Sep  3 09:13:46 2014 +0300| [c487972ed0e1eaebdbe4a13cdd191e119be0b19c] | committer: Martin Storsjö

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 at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c487972ed0e1eaebdbe4a13cdd191e119be0b19c
---

 tools/ismindex.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/ismindex.c b/tools/ismindex.c
index f49916a..a6a9763 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);



More information about the ffmpeg-cvslog mailing list