summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-09 17:48:24 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-09 17:48:24 +0100
commitf3acdd44bf37557574dea2c2c6d9771642e9ebbc (patch)
treeece8ce0c42a2aa296242a940f1d216531a384d14 /libavcodec
parent04dac5d1e00846610e65b928b2461eba39425613 (diff)
parenta1ee1648690726b34e98eaf8db04fd7b3303cfc8 (diff)
Merge commit 'a1ee1648690726b34e98eaf8db04fd7b3303cfc8'
* commit 'a1ee1648690726b34e98eaf8db04fd7b3303cfc8': lavc/decode_video(): always unref the frame if there is no output in decode_video Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 3c9f1243b2..0475064044 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2090,9 +2090,6 @@ fail:
ret = avpkt->size;
}
- if (ret < 0 && picture->buf[0])
- av_frame_unref(picture);
-
if (*got_picture_ptr) {
if (!avctx->refcounted_frames) {
avci->to_free = *picture;
@@ -2105,7 +2102,8 @@ fail:
guess_correct_pts(avctx,
picture->pkt_pts,
picture->pkt_dts));
- }
+ } else
+ av_frame_unref(picture);
} else
ret = 0;