diff options
author | waker <wakeroid@gmail.com> | 2011-12-08 19:49:15 +0100 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-12-08 19:49:15 +0100 |
commit | 9678edfcdf75182f4539958ce60ac49088eed28f (patch) | |
tree | 0fa4bf0148d6692b374d36968d0d4a2b08682d0b /plugins | |
parent | c562bf002073a0085cd149a70098b51e86285728 (diff) |
aac: fixed crash when mp4 doesn't contain aac track
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/aac/aac.c | 6 | ||||
-rw-r--r-- | plugins/mpgmad/mpgmad.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/plugins/aac/aac.c b/plugins/aac/aac.c index 5af09db0..4c7811a5 100644 --- a/plugins/aac/aac.c +++ b/plugins/aac/aac.c @@ -294,7 +294,7 @@ aac_probe (DB_FILE *fp, const char *fname, MP4FILE_CB *cb, float *duration, int for (i = 0; i < ntracks; i++) { mp4AudioSpecificConfig mp4ASC; mp4ff_get_decoder_config(mp4, i, &buff, &buff_size); - if(buff){ + if (buff) { int rc = AudioSpecificConfig(buff, buff_size, &mp4ASC); sr = mp4ASC.samplingFrequency; if(rc < 0) { @@ -307,6 +307,7 @@ aac_probe (DB_FILE *fp, const char *fname, MP4FILE_CB *cb, float *duration, int } if (i != ntracks && buff) { + trace ("found audio track (%d)\n", i); // init mp4 decoding NeAACDecHandle dec = NeAACDecOpen (); unsigned long srate; @@ -365,10 +366,13 @@ error: return -1; } else { + trace ("audio track not found\n"); mp4ff_close (mp4); + mp4 = NULL; } if (buff) { free (buff); + buff = NULL; } } diff --git a/plugins/mpgmad/mpgmad.c b/plugins/mpgmad/mpgmad.c index 041386a2..efb52321 100644 --- a/plugins/mpgmad/mpgmad.c +++ b/plugins/mpgmad/mpgmad.c @@ -25,6 +25,8 @@ #include <sys/time.h> #include "../../deadbeef.h" +#pragma GCC optimize("O0") + //#define trace(...) { fprintf(stderr, __VA_ARGS__); } #define trace(fmt,...) |