---
 tools/ismindex.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/tools/ismindex.c b/tools/ismindex.c
index d91925e..997066b 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 as it has zero bitrate\n", i);
+            continue;
+        }
+
         track = av_mallocz(sizeof(*track));
         if (!track) {
             err = AVERROR(ENOMEM);
@@ -504,10 +510,6 @@ static void output_client_manifest(struct Tracks *tracks, 
const char *basename,
             track = tracks->tracks[i];
             if (!track->is_video)
                 continue;
-            if (track->bitrate == 0) {
-                fprintf(stderr, "Skipping video track %d as it has zero 
bitrate\n", i);
-                continue;
-            }
             fprintf(out,
                     "\t\t<QualityLevel Index=\"%d\" Bitrate=\"%d\" "
                     "FourCC=\"%s\" MaxWidth=\"%d\" MaxHeight=\"%d\" "
@@ -520,10 +522,6 @@ static void output_client_manifest(struct Tracks *tracks, 
const char *basename,
             if (track->chunks != first_track->chunks)
                 fprintf(stderr, "Mismatched number of video chunks in %s (id: 
%d, chunks %d) and %s (id: %d, chunks %d)\n",
                         track->name, track->track_id, track->chunks, 
first_track->name, first_track->track_id, first_track->chunks);
-            if (track->chunks > first_track->chunks) {
-                first_track = track;
-                tracks->video_track = i;
-            }
         }
         print_track_chunks(out, tracks, tracks->video_track, "video");
         fprintf(out, "\t</StreamIndex>\n");
-- 
1.8.5.2 (Apple Git-48)

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to