Browse Source

mpegvideo: unref cur/next/prev frames when flushing

Signed-off-by: Anton Khirnov <anton@khirnov.net>
tags/n2.0
Hendrik Leppkes Anton Khirnov 12 years ago
parent
commit
feec9349d3
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavcodec/mpegvideo.c

+ 4
- 0
libavcodec/mpegvideo.c View File

@@ -2358,6 +2358,10 @@ void ff_mpeg_flush(AVCodecContext *avctx){
ff_mpeg_unref_picture(s, &s->picture[i]); ff_mpeg_unref_picture(s, &s->picture[i]);
s->current_picture_ptr = s->last_picture_ptr = s->next_picture_ptr = NULL; s->current_picture_ptr = s->last_picture_ptr = s->next_picture_ptr = NULL;


ff_mpeg_unref_picture(s, &s->current_picture);
ff_mpeg_unref_picture(s, &s->last_picture);
ff_mpeg_unref_picture(s, &s->next_picture);

s->mb_x= s->mb_y= 0; s->mb_x= s->mb_y= 0;


s->parse_context.state= -1; s->parse_context.state= -1;


Loading…
Cancel
Save