mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-03 05:22:10 +00:00
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>
This commit is contained in:
parent
95e177eeb2
commit
c487972ed0
@ -325,6 +325,12 @@ static int handle_file(struct Tracks *tracks, const char *file, int split,
|
|||||||
for (i = 0; i < ctx->nb_streams; i++) {
|
for (i = 0; i < ctx->nb_streams; i++) {
|
||||||
struct Track **temp;
|
struct Track **temp;
|
||||||
AVStream *st = ctx->streams[i];
|
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));
|
track = av_mallocz(sizeof(*track));
|
||||||
if (!track) {
|
if (!track) {
|
||||||
err = AVERROR(ENOMEM);
|
err = AVERROR(ENOMEM);
|
||||||
|
Loading…
Reference in New Issue
Block a user