av_dict_set: fix potential memory leak with AV_DICT_DONT_OVERWRITE

av_dict_set leaks it key/value arguments if AV_DICT_DONT_OVERWRITE is
combined with AV_DICT_DONT_STRDUP_{KEY,VAL} and the key exists.
Merge commit '1619274fb393f55a365cc10f88faa173c9a8e772'

* commit '1619274fb393f55a365cc10f88faa173c9a8e772':
  av_dict_set: fix potential memory leak with AV_DICT_DONT_OVERWRITE

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avfilter/vf_zoompan: fix mixing of declarations and statements

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat: add mjpeg_probe()

Fixes Ticket3679

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>