aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2018-05-08 12:46:12 -0700
committerAman Gupta <aman@tmm1.net>2018-05-09 12:30:17 -0700
commit12ceaf0fbacb20b86bdc343ba2bbc71d2fff72e0 (patch)
tree579b09e586506c562e0f7ce71a6dde21154d2bd0
parenta19bac8fc8b6a8df4030f79a6192b20492b02cef (diff)
downloadffmpeg-12ceaf0fbacb20b86bdc343ba2bbc71d2fff72e0.tar.gz
ffprobe: fix SEGV when new streams are added
Signed-off-by: Aman Gupta <aman@tmm1.net>
-rw-r--r--fftools/ffprobe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index 8b2a18b6b1..544786ec72 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -2371,11 +2371,11 @@ static int read_interval_packets(WriterContext *w, InputFile *ifile,
goto end;
}
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_packets, 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]) {
AVRational tb = ifile->streams[pkt.stream_index].st->time_base;