Commit d66fb13d authored by Laurent Aimar's avatar Laurent Aimar Committed by Jean-Baptiste Kempf

Flush avcodec on discontinuity.

It is needed to be sure that the first image displayed after a discontinuity
(flush or seek) is the right one.

Manually cherry-picked from 4979e6d702eab1973dfee025c492bb3f945363e0 by jb
Please, double check
parent d7c4ad9b
...@@ -430,10 +430,10 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block ) ...@@ -430,10 +430,10 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
p_sys->input_pts = p_sys->input_dts = 0; p_sys->input_pts = p_sys->input_dts = 0;
p_sys->i_late_frames = 0; p_sys->i_late_frames = 0;
block_Release( p_block ); if( p_block->i_flags & BLOCK_FLAG_DISCONTINUITY )
avcodec_flush_buffers( p_sys->p_context );
//if( p_block->i_flags & BLOCK_FLAG_CORRUPTED ) block_Release( p_block );
//avcodec_flush_buffers( p_sys->p_context );
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment