| @@ -666,6 +666,9 @@ static int decodeAACfile(char *aacfile, char *sndfile, char *adts_fn, int to_std · 665 unmodified lines |
| 666 | break; | 666 | break; |
| 667 | } | 667 | } |
| 668 | | 668 | |
| | 669 | // Override the logic of skipping 0-th output frame. |
| | 670 | NeAACDecPostSeekReset(hDecoder, 1); |
| | 671 | |
| 669 | if (infoOnly) | 672 | if (infoOnly) |
| 670 | { | 673 | { |
| 671 | NeAACDecClose(hDecoder); | 674 | NeAACDecClose(hDecoder); |
| @@ -754,7 +757,7 @@ static int decodeAACfile(char *aacfile, char *sndfile, char *adts_fn, int to_std · 82 unmodified lines |
| 754 | | 757 | |
| 755 | if ((frameInfo.error == 0) && (frameInfo.samples > 0) && (!adts_out)) | 758 | if ((frameInfo.error == 0) && (frameInfo.samples > 0) && (!adts_out)) |
| 756 | { | 759 | { |
| 757 | if (write_audio_file(aufile, sample_buffer, frameInfo.samples, 0) == 0) | 760 | if (write_audio_file(aufile, sample_buffer, frameInfo.samples) == 0) |
| 758 | break; | 761 | break; |
| 759 | } | 762 | } |
| 760 | | 763 | |
| @@ -907,7 +910,6 @@ static int decodeMP4file(char *mp4file, char *sndfile, char *adts_fn, int to_std · 146 unmodified lines |
| 907 | /*int rc;*/ | 910 | /*int rc;*/ |
| 908 | long dur; | 911 | long dur; |
| 909 | unsigned int sample_count; | 912 | unsigned int sample_count; |
| 910 | unsigned int delay = 0; | | |
| 911 | | 913 | |
| 912 | if (mp4read_frame()) | 914 | if (mp4read_frame()) |
| 913 | break; | 915 | break; |
| @@ -997,7 +999,7 @@ static int decodeMP4file(char *mp4file, char *sndfile, char *adts_fn, int to_std · 83 unmodified lines |
| 997 | | 999 | |
| 998 | if ((frameInfo.error == 0) && (sample_count > 0) && (!adts_out)) | 1000 | if ((frameInfo.error == 0) && (sample_count > 0) && (!adts_out)) |
| 999 | { | 1001 | { |
| 1000 | if (write_audio_file(aufile, sample_buffer, sample_count, delay) == 0) | 1002 | if (write_audio_file(aufile, sample_buffer, sample_count) == 0) |
| 1001 | break; | 1003 | break; |
| 1002 | } | 1004 | } |
| 1003 | | 1005 | |
| @@ -1154,6 +1156,8 @@ static int faad_main(int argc, char *argv[]) · 150 unmodified lines |
| 1154 | outputFormat = atoi(dr); | 1156 | outputFormat = atoi(dr); |
| 1155 | if ((outputFormat < 1) || (outputFormat > 5)) | 1157 | if ((outputFormat < 1) || (outputFormat > 5)) |
| 1156 | showHelp = 1; | 1158 | showHelp = 1; |
| | 1159 | if (outputFormat == 5) // Not yet unsupported by "audio". |
| | 1160 | showHelp = 1; |
| 1157 | } | 1161 | } |
| 1158 | } | 1162 | } |
| 1159 | break; | 1163 | break; |