diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-01-09 01:09:57 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-01-09 01:09:57 +0000 |
commit | 85a2757ca43eaf781c662a77c5a18b2d6dcb22fe (patch) | |
tree | 38ed9d7a46cafc4dc40ad8a9bb90802a1da56d40 | |
parent | 30376100bd14ec525f3daffdaf9a084d9c9b5cee (diff) | |
download | xine-lib-85a2757ca43eaf781c662a77c5a18b2d6dcb22fe.tar.gz xine-lib-85a2757ca43eaf781c662a77c5a18b2d6dcb22fe.tar.bz2 |
handled/unhandled fixes. now it should work for dvd too.
CVS patchset: 3839
CVS date: 2003/01/09 01:09:57
-rw-r--r-- | src/xine-engine/audio_decoder.c | 14 | ||||
-rw-r--r-- | src/xine-engine/video_decoder.c | 15 |
2 files changed, 17 insertions, 12 deletions
diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c index 11a0ebb6b..e9708983a 100644 --- a/src/xine-engine/audio_decoder.c +++ b/src/xine-engine/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.98 2003/01/08 01:02:32 miguelfreitas Exp $ + * $Id: audio_decoder.c,v 1.99 2003/01/09 01:09:57 miguelfreitas Exp $ * * * functions that implement audio decoding @@ -96,6 +96,10 @@ void *audio_decoder_loop (void *stream_gen) { } stream->metronom->handle_audio_discontinuity (stream->metronom, DISC_STREAMSTART, 0); + + /* assume handled, we will known after trying to init decoder */ + stream->stream_info[XINE_STREAM_INFO_AUDIO_HANDLED] = + stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO]; buftype_unknown = 0; break; @@ -266,9 +270,8 @@ void *audio_decoder_loop (void *stream_gen) { stream->audio_decoder_streamtype = streamtype; stream->audio_decoder_plugin = get_audio_decoder (stream, streamtype); - if (stream->audio_decoder_plugin) - stream->stream_info[XINE_STREAM_INFO_AUDIO_HANDLED] = 1; - + stream->stream_info[XINE_STREAM_INFO_AUDIO_HANDLED] = + (stream->audio_decoder_plugin != NULL); } if (audio_type != stream->audio_type) { @@ -290,8 +293,7 @@ void *audio_decoder_loop (void *stream_gen) { stream->audio_decoder_plugin->decode_data (stream->audio_decoder_plugin, buf); if (buf->type != buftype_unknown && - (!stream->audio_decoder_plugin || - !stream->stream_info[XINE_STREAM_INFO_AUDIO_HANDLED])) { + !stream->stream_info[XINE_STREAM_INFO_AUDIO_HANDLED]) { xine_log (stream->xine, XINE_LOG_MSG, "audio_decoder: no plugin available to handle '%s'\n", buf_audio_name( buf->type ) ); diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index 6be4f866a..c42e217ea 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_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: video_decoder.c,v 1.121 2003/01/08 01:02:32 miguelfreitas Exp $ + * $Id: video_decoder.c,v 1.122 2003/01/09 01:09:57 miguelfreitas Exp $ * */ @@ -106,6 +106,10 @@ void *video_decoder_loop (void *stream_gen) { stream->metronom->handle_video_discontinuity (stream->metronom, DISC_STREAMSTART, 0); + + /* assume handled, we will known after trying to init decoder */ + stream->stream_info[XINE_STREAM_INFO_VIDEO_HANDLED] = + stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO]; buftype_unknown = 0; break; @@ -267,16 +271,15 @@ void *video_decoder_loop (void *stream_gen) { stream->video_decoder_streamtype = streamtype; stream->video_decoder_plugin = get_video_decoder (stream, streamtype); - if( stream->video_decoder_plugin ) - stream->stream_info[XINE_STREAM_INFO_VIDEO_HANDLED] = 1; + stream->stream_info[XINE_STREAM_INFO_VIDEO_HANDLED] = + (stream->video_decoder_plugin != NULL); } if (stream->video_decoder_plugin) stream->video_decoder_plugin->decode_data (stream->video_decoder_plugin, buf); - if (buf->type != buftype_unknown && - (!stream->video_decoder_plugin || - !stream->stream_info[XINE_STREAM_INFO_VIDEO_HANDLED])) { + if (buf->type != buftype_unknown && + !stream->stream_info[XINE_STREAM_INFO_VIDEO_HANDLED]) { xine_log (stream->xine, XINE_LOG_MSG, "video_decoder: no plugin available to handle '%s'\n", buf_video_name( buf->type ) ); |