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:
Andreas Rheinhardt 2021-05-12 15:50:30 +02:00
parent d29541c90a
commit 7af1a3cebe
1 changed files with 0 additions and 1 deletions

View File

@ -372,7 +372,6 @@ end:
return ret;
free_and_end:
avcodec_close(avctx);
av_dict_free(options);
goto end;
}