[MPlayer-cvslog] r33029 - trunk/libmpcodecs/ad_ffmpeg.c
reimar
subversion at mplayerhq.hu
Sat Mar 5 13:27:15 CET 2011
Author: reimar
Date: Sat Mar 5 13:27:15 2011
New Revision: 33029
Log:
Fix dnet decoding with -ac ffac3, the data needs to be byte-swapped.
Modified:
trunk/libmpcodecs/ad_ffmpeg.c
Modified: trunk/libmpcodecs/ad_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/ad_ffmpeg.c Sat Mar 5 13:24:33 2011 (r33028)
+++ trunk/libmpcodecs/ad_ffmpeg.c Sat Mar 5 13:27:15 2011 (r33029)
@@ -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 @@ static int decode_audio(sh_audio_t *sh_a
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;
More information about the MPlayer-cvslog
mailing list