avcodec/mmaldec: Avoid creating unnecessary reference, simplify code
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Thu, 9 Dec 2021 11:37:18 +0000 (12:37 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Sun, 12 Dec 2021 15:55:33 +0000 (16:55 +0100)
commit9644ee224f56118e5b1ac4edc1b088a6a6ac2ac7
tree711fe018dc4241f34a5657335b8309730273eb48
parentdd779749f05fd3a786857b06ee4efc5e193bf90e
avcodec/mmaldec: Avoid creating unnecessary reference, simplify code

ffmal_add_packet() basically duplicated the logic in
av_packet_make_refcounted() with the added twist that it always
created a reference even if one is already available.
This commit stops doing this.

Tested-by: Cameron Gutman <aicommander@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
libavcodec/mmaldec.c