[FFmpeg-devel] [PATCH 1/3] ffmpeg_opt: get_preset_file_2(): fix avio_open2() return code check
Timothy Gu
timothygu99 at gmail.com
Mon Feb 24 01:41:56 CET 2014
On Sat, Feb 22, 2014 at 1:50 PM, Timothy Gu <timothygu99 at gmail.com> wrote:
> avio_open2() only return < 0 when error.
>
> Signed-off-by: Timothy Gu <timothygu99 at gmail.com>
> ---
> ffmpeg_opt.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Ping the patch set
>
> diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
> index 5db961a..ac48d59 100644
> --- a/ffmpeg_opt.c
> +++ b/ffmpeg_opt.c
> @@ -984,7 +984,7 @@ static int get_preset_file_2(const char *preset_name, const char *codec_name, AV
> AVCONV_DATADIR,
> };
>
> - for (i = 0; i < FF_ARRAY_ELEMS(base) && ret; i++) {
> + for (i = 0; i < FF_ARRAY_ELEMS(base) && ret < 0; i++) {
> if (!base[i])
> continue;
> if (codec_name) {
> @@ -992,7 +992,7 @@ static int get_preset_file_2(const char *preset_name, const char *codec_name, AV
> i != 1 ? "" : "/.avconv", codec_name, preset_name);
> ret = avio_open2(s, filename, AVIO_FLAG_READ, &int_cb, NULL);
> }
> - if (ret) {
> + if (ret < 0) {
> snprintf(filename, sizeof(filename), "%s%s/%s.avpreset", base[i],
> i != 1 ? "" : "/.avconv", preset_name);
> ret = avio_open2(s, filename, AVIO_FLAG_READ, &int_cb, NULL);
> --
> 1.8.3.2
>
More information about the ffmpeg-devel
mailing list