summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodeo <[email protected]>2013-12-05 17:26:46 +0000
committerRodeo <[email protected]>2013-12-05 17:26:46 +0000
commit60bb4d72efaf394627bf3c046caf1ac7e63ca94b (patch)
tree6e153fbf798e9c4f9460fc5ad26a6a28529c98bb
parentc6dad1609343dd04b8282a1f761de0f9e2b1f31c (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.c10
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 );