Skip to content

Commit

Permalink
scan: enable HBTF_NO_IDR when not enough previews found
Browse files Browse the repository at this point in the history
Setting this flag signals to libav to not wait for IDR or recovery
points before returning frames to us.  Some videos have neither IDRs or
recovery points, so this fixes transcoding such video.

Fixes #456
  • Loading branch information
jstebbins committed Apr 11, 2017
1 parent f09dc2d commit 7e346ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libhb/scan.c
Expand Up @@ -223,6 +223,10 @@ static void ScanFunc( void * _data )
npreviews = DecodePreviews( data, title, 1 );
if (npreviews < 2)
{
// Try harder to get some valid frames
// Allow libav to return "corrupt" frames
hb_log("scan: Too few previews (%d), trying harder", npreviews);
title->flags |= HBTF_NO_IDR;
npreviews = DecodePreviews( data, title, 0 );
}
if (npreviews == 0)
Expand Down

0 comments on commit 7e346ba

Please sign in to comment.