Re: [LAD] c/jack question

From: Egor Sanin <egor.sanin@email-addr-hidden>
Date: Sun Apr 08 2012 - 20:01:50 EEST

Hi Mark,

> In A, &pos refers to valid chunk of memory, thus when
> jack_transport_query operates on it, it has a valid piece of memory to
> work with.

Got it, thanks!

> In B, pos (IIRC) would be initialized to NULL as it is in the file scope.
> So when you call jack_transport_query, you have provided a pointer to
> NULL, where any memory access will be invalid.

But then why does jack_transport_query not give any error when it is
passed a NULL pointer in the form of pos?
If I remove the line
frame = pos->frame;
from B, the code runs, state is set properly and jackd doesn't report problems.

Thanks for you help.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Sun Apr 8 20:15:03 2012

This archive was generated by hypermail 2.1.8 : Sun Apr 08 2012 - 20:15:03 EEST