[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog libmedia/ffmpeg/AudioDecoderFfm...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog libmedia/ffmpeg/AudioDecoderFfm... |
Date: |
Thu, 05 Jun 2008 13:32:45 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/06/05 13:32:45
Modified files:
. : ChangeLog
libmedia/ffmpeg: AudioDecoderFfmpeg.cpp
Log message:
(setup): print codec name in error and debug.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6827&r2=1.6828
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp?cvsroot=gnash&r1=1.6&r2=1.7
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6827
retrieving revision 1.6828
diff -u -b -r1.6827 -r1.6828
--- ChangeLog 5 Jun 2008 10:08:32 -0000 1.6827
+++ ChangeLog 5 Jun 2008 13:32:44 -0000 1.6828
@@ -1,3 +1,8 @@
+2008-06-05 Sandro Santilli <address@hidden>
+
+ * libmedia/ffmpeg/AudioDecoderFfmpeg.cpp (setup): print codec
+ name in error and debug.
+
2008-06-05 Benjamin Wolsey <address@hidden>
* server/as_environment.cpp: fix warning, minor changes.
Index: libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
===================================================================
RCS file: /sources/gnash/gnash/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- libmedia/ffmpeg/AudioDecoderFfmpeg.cpp 5 Jun 2008 09:40:35 -0000
1.6
+++ libmedia/ffmpeg/AudioDecoderFfmpeg.cpp 5 Jun 2008 13:32:45 -0000
1.7
@@ -108,7 +108,12 @@
enum CodecID codec_id = CODEC_ID_NONE;
- if (info->type == FLASH) {
+ if (info->type == FFMPEG)
+ {
+ codec_id = static_cast<CodecID>(info->codec);
+ }
+ else if (info->type == FLASH)
+ {
switch(info->codec)
{
@@ -125,30 +130,25 @@
log_error(_("Unsupported audio codec %d"),
static_cast<int>(info->codec));
return false;
}
- _audioCodec = avcodec_find_decoder(codec_id);
- // Init the parser
- _parser = av_parser_init(codec_id);
- }
- else if (info->type == FFMPEG)
- {
- _audioCodec =
avcodec_find_decoder(static_cast<CodecID>(info->codec));
- // Init the parser
- _parser = av_parser_init(static_cast<CodecID>(info->codec));
}
else
{
+ log_error("AudioDecoderFfmpeg::setup: unknown codec type %d (
should never happen )", info->type);
return false;
}
+ _audioCodec = avcodec_find_decoder(codec_id);
if (!_audioCodec)
{
log_error(_("libavcodec can't decode the current audio
format"));
return false;
}
+ // Init the parser
+ _parser = av_parser_init(static_cast<CodecID>(info->codec));
+
// Create an audioCodecCtx from the ffmpeg parser if exists/possible
_audioCodecCtx = avcodec_alloc_context();
-
if (!_audioCodecCtx) {
log_error(_("libavcodec couldn't allocate context"));
return false;
@@ -159,7 +159,8 @@
//avcodec_close(_audioCodecCtx);
av_free(_audioCodecCtx);
_audioCodecCtx = 0;
- log_error(_("AudioDecoderFfmpeg::setup: avcodec_open: failed to
initialize FFMPEG codec %d"), (int)codec_id);
+ log_error(_("AudioDecoderFfmpeg::setup: avcodec_open: failed to
initialize FFMPEG codec %s (%d)"),
+ _audioCodec->name, (int)codec_id);
return false;
}
@@ -169,6 +170,9 @@
//_audioCodecCtx->sample_fmt = SAMPLE_FMT_S16;
}
+ log_debug(_("AudioDecoderFfmpeg::setup: initialized FFMPEG codec %s
(%d)"),
+ _audioCodec->name, (int)codec_id);
+
return true;
}