]> git.sesse.net Git - ffmpeg/commit
libavcodec/avpacket: Don't simply forward return value of av_dict_set()
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 17 Apr 2020 13:55:57 +0000 (15:55 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 23 Apr 2020 17:42:03 +0000 (19:42 +0200)
commit6b0c94780d8087772a718bfa8fdcb46b1770b987
treec83b745703521fdb076125e0743802340cb61296
parentae2537f53e8ebfa36345241b5b70c0b1aef66dd2
libavcodec/avpacket: Don't simply forward return value of av_dict_set()

The documentation of av_dict_set() states that values >= 0 indicate
success, whereas av_packet_unpack_dictionary() implies that return
values > 0 are impossible. So only forward the return value of
av_dict_set() in av_packet_unpack_dictionary() on error.

(Btw: av_dict_set() does currently not return values > 0.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/avpacket.c