mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/avcodec: Don't free options on failure in avcodec_open2()
Instead return the dictionary in the state it is at the time the error occurred. This is more in line with the description of this parameter and allows to notify the user of unrecognized options if an error happens lateron (which might very well be due to e.g. misspelled options). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
d29541c90a
commit
7af1a3cebe
|
@ -372,7 +372,6 @@ end:
|
||||||
return ret;
|
return ret;
|
||||||
free_and_end:
|
free_and_end:
|
||||||
avcodec_close(avctx);
|
avcodec_close(avctx);
|
||||||
av_dict_free(options);
|
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue