mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
ffprobe: fix SEGV when new streams are added
Signed-off-by: Aman Gupta <aman@tmm1.net>
This commit is contained in:
parent
a19bac8fc8
commit
12ceaf0fba
@ -2371,11 +2371,11 @@ static int read_interval_packets(WriterContext *w, InputFile *ifile,
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
while (!av_read_frame(fmt_ctx, &pkt)) {
|
while (!av_read_frame(fmt_ctx, &pkt)) {
|
||||||
if (ifile->nb_streams > nb_streams) {
|
if (fmt_ctx->nb_streams > nb_streams) {
|
||||||
REALLOCZ_ARRAY_STREAM(nb_streams_frames, nb_streams, fmt_ctx->nb_streams);
|
REALLOCZ_ARRAY_STREAM(nb_streams_frames, nb_streams, fmt_ctx->nb_streams);
|
||||||
REALLOCZ_ARRAY_STREAM(nb_streams_packets, nb_streams, fmt_ctx->nb_streams);
|
REALLOCZ_ARRAY_STREAM(nb_streams_packets, nb_streams, fmt_ctx->nb_streams);
|
||||||
REALLOCZ_ARRAY_STREAM(selected_streams, nb_streams, fmt_ctx->nb_streams);
|
REALLOCZ_ARRAY_STREAM(selected_streams, nb_streams, fmt_ctx->nb_streams);
|
||||||
nb_streams = ifile->nb_streams;
|
nb_streams = fmt_ctx->nb_streams;
|
||||||
}
|
}
|
||||||
if (selected_streams[pkt.stream_index]) {
|
if (selected_streams[pkt.stream_index]) {
|
||||||
AVRational tb = ifile->streams[pkt.stream_index].st->time_base;
|
AVRational tb = ifile->streams[pkt.stream_index].st->time_base;
|
||||||
|
Loading…
Reference in New Issue
Block a user