Skip to content

Commit

Permalink
Only init gst pipeline after sucessful hu_aap_start
Browse files Browse the repository at this point in the history
  • Loading branch information
gartnera committed Apr 24, 2016
1 parent abae02c commit f7c7bb5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions mazda/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1002,15 +1002,6 @@ int main (int argc, char *argv[])
byte ep_in_addr = -2;
byte ep_out_addr = -2;

switch_audio(AUDIO_AA);

/* Init gstreamer pipeline */
ret = gst_pipeline_init(app);
if (ret < 0) {
printf("gst_pipeline_init() ret: %d\n", ret);
return (-4);
}

/* Start AA processing */
ret = hu_aap_start (ep_in_addr, ep_out_addr);
if (ret == -1)
Expand All @@ -1032,6 +1023,15 @@ int main (int argc, char *argv[])

printf("Starting Android Auto...\n");

switch_audio(AUDIO_AA);

/* Init gstreamer pipeline */
ret = gst_pipeline_init(app);
if (ret < 0) {
printf("gst_pipeline_init() ret: %d\n", ret);
return (-4);
}

/* Open Touchscreen Device */
mTouch.fd = open(EVENT_DEVICE_TS, O_RDONLY);

Expand Down

0 comments on commit f7c7bb5

Please sign in to comment.