diff options
author | Rodeo <[email protected]> | 2013-12-05 17:26:46 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2013-12-05 17:26:46 +0000 |
commit | 60bb4d72efaf394627bf3c046caf1ac7e63ca94b (patch) | |
tree | 6e153fbf798e9c4f9460fc5ad26a6a28529c98bb | |
parent | c6dad1609343dd04b8282a1f761de0f9e2b1f31c (diff) |
sync: use "drop video to sync" fallback also when audio encoding fails or we do not get an output packet after 10 tries.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5918 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/sync.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libhb/sync.c b/libhb/sync.c index 0b38fa1f3..ac9c95885 100644 --- a/libhb/sync.c +++ b/libhb/sync.c @@ -1254,7 +1254,9 @@ static void InitAudio( hb_job_t * job, hb_sync_common_t * common, int i ) int ret = avcodec_encode_audio2( c, &pkt, &frame, &got_packet); if ( ret < 0 ) { - hb_log( "sync: avcodec_encode_audio failed" ); + hb_log("sync: track %d, avcodec_encode_audio() failed, dropping video to sync", + w->audio->config.out.track); + sync->drop_video_to_sync = 1; break; } @@ -1263,6 +1265,12 @@ static void InitAudio( hb_job_t * job, hb_sync_common_t * common, int i ) sync->silence_size = pkt.size; break; } + else if (ii + 1 == 10) + { + hb_log("sync: track %d, failed to get output packet, dropping video to sync", + w->audio->config.out.track); + sync->drop_video_to_sync = 1; + } } free( zeros ); hb_avcodec_close( c ); |