Mercurial > mplayer.hg
changeset 32942:e3dfc7e2b0f8
Fix dnet decoding with -ac ffac3, the data needs to be byte-swapped.
author | reimar |
---|---|
date | Sat, 05 Mar 2011 12:27:15 +0000 |
parents | 4c49c83f2af7 |
children | d1c2c8899ec1 |
files | libmpcodecs/ad_ffmpeg.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/ad_ffmpeg.c Sat Mar 05 12:24:33 2011 +0000 +++ b/libmpcodecs/ad_ffmpeg.c Sat Mar 05 12:27:15 2011 +0000 @@ -16,6 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#define _XOPEN_SOURCE 600 #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -220,6 +221,10 @@ int consumed = ds_parse(sh_audio->ds, &start, &x, pts, 0); sh_audio->ds->buffer_pos -= in_size - consumed; } + if (((AVCodecContext *)sh_audio->context)->codec_id == CODEC_ID_AC3 && + sh_audio->format == MKTAG('d', 'n', 'e', 't')) + swab(start, start, x & ~1); + av_init_packet(&pkt); pkt.data = start; pkt.size = x;