int interlaced_preview_count = 0;
int frame_wait = 0;
int cc_wait = 10;
+ int frames;
hb_stream_t * stream = NULL;
info_list_t * info_list = calloc( data->preview_count+1, sizeof(*info_list) );
crop_record_t *crops = crop_record_init( data->preview_count );
frame_wait = 10;
}
}
+ else
+ {
+ // For certain mpeg-2 streams, libav is delivering a
+ // dummy first frame that is all black. So always skip
+ // one frame
+ frame_wait = 1;
+ }
+ frames = 0;
hb_buffer_t * vid_buf = NULL;
// additional frames to find the CCs.
if (vid_buf != NULL && (frame_wait || cc_wait))
{
- if (vid_buf->s.frametype == HB_FRAME_I)
+ if (frames > 0 && vid_buf->s.frametype == HB_FRAME_I)
frame_wait = 0;
if (frame_wait || cc_wait)
{
if (frame_wait) frame_wait--;
if (cc_wait) cc_wait--;
}
+ frames++;
}
}
else if( ! AllAudioOK( title ) )