summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.c1
-rw-r--r--src/player.c7
-rw-r--r--src/player.h1
3 files changed, 5 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 81181aa..a9efb9c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -27,7 +27,6 @@ THE SOFTWARE.
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
-#include <neaacdec.h>
#include <pthread.h>
#include <unistd.h>
#include <poll.h>
diff --git a/src/player.c b/src/player.c
index 3a7aa25..a969245 100644
--- a/src/player.c
+++ b/src/player.c
@@ -123,8 +123,8 @@ size_t playCurlCb (void *ptr, size_t size, size_t nmemb, void *stream) {
&player->channels);
player->bufferRead += 5;
if (err != 0) {
- printf ("Error while initializing audio decoder (%i)\n",
- err);
+ printf ("Error while initializing audio decoder"
+ "(%i)\n", err);
return 1;
}
audioOutDriver = ao_default_driver_id();
@@ -159,7 +159,8 @@ size_t playCurlCb (void *ptr, size_t size, size_t nmemb, void *stream) {
/* how many frames do we have? */
if (player->sampleSizeN == 0) {
/* mp4 uses big endian, convert */
- player->sampleSizeN = changeByteorderUI32 (player->buffer +
+ player->sampleSizeN =
+ changeByteorderUI32 (player->buffer +
player->bufferRead);
player->sampleSize = calloc (player->sampleSizeN,
sizeof (player->sampleSizeN));
diff --git a/src/player.h b/src/player.h
index 2e36c11..04275a9 100644
--- a/src/player.h
+++ b/src/player.h
@@ -49,3 +49,4 @@ struct aacPlayer {
};
void *threadPlayUrl (void *data);
+