summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libffmpeg/audio_decoder.c26
-rw-r--r--src/libffmpeg/xine_decoder.c3
2 files changed, 16 insertions, 13 deletions
diff --git a/src/libffmpeg/audio_decoder.c b/src/libffmpeg/audio_decoder.c
index 18cf3ff9e..ed1a52a5d 100644
--- a/src/libffmpeg/audio_decoder.c
+++ b/src/libffmpeg/audio_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_decoder.c,v 1.18 2005/10/23 02:11:16 miguelfreitas Exp $
+ * $Id: audio_decoder.c,v 1.19 2005/10/23 02:47:18 miguelfreitas Exp $
*
* xine audio decoder plugin using ffmpeg
*
@@ -226,27 +226,29 @@ static void ff_audio_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
this->decode_buffer = xine_xmalloc(AVCODEC_MAX_AUDIO_FRAME_SIZE);
- if (avcodec_open (this->context, this->codec) < 0) {
- xprintf (this->stream->xine, XINE_VERBOSITY_LOG,
- _("ffmpeg_audio_dec: couldn't open decoder\n"));
- _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
- return;
- }
-
- this->decoder_ok = 1;
-
return;
}
} else if ((buf->decoder_flags & BUF_FLAG_SPECIAL) &&
(buf->decoder_info[1] == BUF_SPECIAL_STSD_ATOM)) {
-
+
this->context->extradata_size = buf->decoder_info[2];
this->context->extradata = xine_xmalloc(buf->decoder_info[2] +
FF_INPUT_BUFFER_PADDING_SIZE);
memcpy(this->context->extradata, buf->decoder_info_ptr[2],
buf->decoder_info[2]);
- } else if (this->decoder_ok && !(buf->decoder_flags & BUF_FLAG_SPECIAL)) {
+ } else if (!(buf->decoder_flags & BUF_FLAG_SPECIAL)) {
+
+ if( !this->decoder_ok ) {
+ if (avcodec_open (this->context, this->codec) < 0) {
+ xprintf (this->stream->xine, XINE_VERBOSITY_LOG,
+ _("ffmpeg_audio_dec: couldn't open decoder\n"));
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
+ return;
+ }
+
+ this->decoder_ok = 1;
+ }
if (!this->output_open) {
this->output_open = this->stream->audio_out->open(this->stream->audio_out,
diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c
index 0dd6511b4..ce59152c3 100644
--- a/src/libffmpeg/xine_decoder.c
+++ b/src/libffmpeg/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.164 2005/05/29 19:20:49 jstembridge Exp $
+ * $Id: xine_decoder.c,v 1.165 2005/10/23 02:47:18 miguelfreitas Exp $
*
* xine decoder plugin using ffmpeg
*
@@ -128,6 +128,7 @@ void avcodec_register_all(void)
register_avcodec(&indeo2_decoder);
register_avcodec(&fraps_decoder);
register_avcodec(&shorten_decoder);
+ register_avcodec(&qdm2_decoder);
}
void init_once_routine(void) {