Commit bd8f524e authored by Gildas Bazin's avatar Gildas Bazin

* modules/codec/ffmpeg/encoder.c: sanity check for frames in the past that...

* modules/codec/ffmpeg/encoder.c: sanity check for frames in the past that libavcodec really doesn't like.
parent dad75559
...@@ -678,6 +678,13 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict ) ...@@ -678,6 +678,13 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
"same PTS (" I64Fd ")", frame.pts ); "same PTS (" I64Fd ")", frame.pts );
return NULL; return NULL;
} }
else if ( p_sys->i_last_pts > frame.pts )
{
msg_Warn( p_enc, "almost fed libavcodec with a frame in the "
"past (current: " I64Fd ", last: "I64Fd")",
frame.pts, p_sys->i_last_pts );
return NULL;
}
else else
{ {
p_sys->i_last_pts = frame.pts; p_sys->i_last_pts = frame.pts;
......
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