[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-114-g43deb20 |
Date: |
Tue, 22 Feb 2011 21:56:28 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".
The branch, master has been updated
via 43deb207b4e0c7e33084057e05e9533932c5b9a6 (commit)
from 1f82c61cdfafee172de2c7555aa890d897aff036 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=43deb207b4e0c7e33084057e05e9533932c5b9a6
commit 43deb207b4e0c7e33084057e05e9533932c5b9a6
Author: Bastiaan Jacques <address@hidden>
Date: Tue Feb 22 22:55:16 2011 +0100
Raw (AKA PCM) audio is signed; don't treat it otherwise.
diff --git a/libmedia/MediaParser.h b/libmedia/MediaParser.h
index 267d702..d9dd995 100644
--- a/libmedia/MediaParser.h
+++ b/libmedia/MediaParser.h
@@ -114,7 +114,7 @@ DSOEXPORT std::ostream& operator<< (std::ostream& os, const
videoCodecType& t);
///
enum audioCodecType
{
- /// Linear PCM, unspecified byte order
+ /// Signed Linear PCM, unspecified byte order
//
/// Use of this codec is deprecated (but still supported) due to
/// the unspecified byte order (you can only play >8bit samples
diff --git a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
index 783c610..f60e743 100644
--- a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
+++ b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
@@ -184,7 +184,11 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
switch(info.codec)
{
case AUDIO_CODEC_RAW:
- codec_id = CODEC_ID_PCM_U16LE;
+ if (info.sampleSize == 2) {
+ codec_id = CODEC_ID_PCM_S16LE;
+ } else {
+ codec_id = CODEC_ID_PCM_S8;
+ }
break;
case AUDIO_CODEC_ADPCM:
@@ -301,12 +305,14 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
case CODEC_ID_MP3:
break;
- case CODEC_ID_PCM_U16LE:
+ case CODEC_ID_PCM_S8:
+ // Either FFMPEG or the parser are getting this wrong.
+ _audioCodecCtx->sample_rate = info.sampleRate / 2;
+ _audioCodecCtx->channels = (info.stereo ? 2 : 1);
+ break;
+ case CODEC_ID_PCM_S16LE:
_audioCodecCtx->channels = (info.stereo ? 2 : 1);
_audioCodecCtx->sample_rate = info.sampleRate;
- // was commented out (why?):
- _audioCodecCtx->sample_fmt = SAMPLE_FMT_S16;
- _audioCodecCtx->frame_size = 1;
break;
default:
-----------------------------------------------------------------------
Summary of changes:
libmedia/MediaParser.h | 2 +-
libmedia/ffmpeg/AudioDecoderFfmpeg.cpp | 16 +++++++++++-----
2 files changed, 12 insertions(+), 6 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-114-g43deb20,
Bastiaan Jacques <=