Message ID | 17ff1b7f-21e5-f226-b675-4dbfc99b2183@googlemail.com |
---|---|
State | Accepted |
Commit | 1966ea012fd72abc8003e95dc3c8ad9e9f197913 |
Headers | show |
On Thu, Oct 20, 2016 at 10:16:17PM +0200, Andreas Cadhalpun wrote: > This fixes asserts (from commit 13aae8) in av_frame_ref and > av_frame_move_ref. > > Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> > --- > libavcodec/cavsdec.c | 2 ++ > 1 file changed, 2 insertions(+) should be ok thx [...]
On 21.10.2016 02:31, Michael Niedermayer wrote: > On Thu, Oct 20, 2016 at 10:16:17PM +0200, Andreas Cadhalpun wrote: >> This fixes asserts (from commit 13aae8) in av_frame_ref and >> av_frame_move_ref. >> >> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> >> --- >> libavcodec/cavsdec.c | 2 ++ >> 1 file changed, 2 insertions(+) > > should be ok Pushed. Best regards, Andreas
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index 70ac6f8..fed7043 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -1217,6 +1217,8 @@ static int cavs_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, h->got_keyframe = 1; } case PIC_PB_START_CODE: + if (*got_frame) + av_frame_unref(data); *got_frame = 0; if (!h->got_keyframe) break;
This fixes asserts (from commit 13aae8) in av_frame_ref and av_frame_move_ref. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> --- libavcodec/cavsdec.c | 2 ++ 1 file changed, 2 insertions(+)