diff options
Diffstat (limited to 'ffprobe.c')
-rw-r--r-- | ffprobe.c | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -1,21 +1,21 @@ /* - * FFprobe : Simple Media Prober based on the Libav libraries + * FFprobe : Simple Media Prober based on the FFmpeg libraries * Copyright (c) 2007-2010 Stefano Sabatini * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -261,12 +261,15 @@ static void show_format(AVFormatContext *fmt_ctx) static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename) { int err, i; + AVFormatParameters fmt_params; AVFormatContext *fmt_ctx; + memset(&fmt_params, 0, sizeof(fmt_params)); + fmt_params.prealloced_context = 1; fmt_ctx = avformat_alloc_context(); set_context_opts(fmt_ctx, avformat_opts, AV_OPT_FLAG_DECODING_PARAM, NULL); - if ((err = av_open_input_file(&fmt_ctx, filename, iformat, 0, NULL)) < 0) { + if ((err = av_open_input_file(&fmt_ctx, filename, iformat, 0, &fmt_params)) < 0) { print_error(filename, err); return err; } @@ -285,7 +288,7 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename) AVCodec *codec; if (!(codec = avcodec_find_decoder(stream->codec->codec_id))) { - fprintf(stderr, "Unsupported codec (id=%d) for input stream %d\n", + fprintf(stderr, "Unsupported codec with id %d for input stream %d\n", stream->codec->codec_id, stream->index); } else if (avcodec_open(stream->codec, codec) < 0) { fprintf(stderr, "Error while opening codec for input stream %d\n", |