summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreddyg <[email protected]>2008-09-09 02:34:57 +0000
committereddyg <[email protected]>2008-09-09 02:34:57 +0000
commit38340006c9205d3fe61fa8e4bad54afcac64d282 (patch)
treebf492cfa01f763df19069686214c08529908227f
parent9bc293ad9c8107c366e21db793809270220c4da4 (diff)
CLI: exit rather than continue when invalid input audio tracks are selected.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1681 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--test/test.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/test.c b/test/test.c
index 45b25416a..39ebaf9e2 100644
--- a/test/test.c
+++ b/test/test.c
@@ -957,21 +957,22 @@ static int HandleEvents( hb_handle_t * h )
}
tmp_num_audio_tracks = num_audio_tracks = hb_list_count(audios);
- for (i = 0; i < num_audio_tracks; i++)
+ for (i = 0; i < tmp_num_audio_tracks; i++)
{
audio = hb_list_item(audios, 0);
if( (audio == NULL) || (audio->in.track == -1) ||
(audio->out.track == -1) || (audio->out.codec == 0) )
{
- tmp_num_audio_tracks--;
+ num_audio_tracks--;
}
else
{
if( hb_audio_add( job, audio ) == 0 )
{
- fprintf(stderr, "ERROR: Invalid audio input track '%u', skipping.\n",
+ fprintf(stderr, "ERROR: Invalid audio input track '%u', exiting.\n",
audio->in.track + 1 );
- tmp_num_audio_tracks--;
+ num_audio_tracks--;
+ exit(3);
}
}
hb_list_rem(audios, audio);
@@ -979,8 +980,6 @@ static int HandleEvents( hb_handle_t * h )
free( audio );
}
- num_audio_tracks = tmp_num_audio_tracks;
-
/* Audio Codecs */
i = 0;
if( acodecs )