Diffstat (limited to 'noncore/multimedia/opieplayer2/nullvideo.c') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/nullvideo.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/nullvideo.c b/noncore/multimedia/opieplayer2/nullvideo.c index c988854..e2eb663 100644 --- a/noncore/multimedia/opieplayer2/nullvideo.c +++ b/noncore/multimedia/opieplayer2/nullvideo.c | |||
@@ -42,4 +42,5 @@ | |||
42 | #include <xine/xineutils.h> | 42 | #include <xine/xineutils.h> |
43 | #include <xine/vo_scale.h> | 43 | #include <xine/vo_scale.h> |
44 | #include <xine/buffer.h> | ||
44 | 45 | ||
45 | #include <pthread.h> | 46 | #include <pthread.h> |
@@ -613,2 +614,22 @@ void null_display_handler( xine_vo_driver_t* self, display_xine_frame_t t, | |||
613 | } | 614 | } |
614 | 615 | ||
616 | void null_preload_decoders( xine_stream_t *stream ) | ||
617 | { | ||
618 | static const uint32_t preloadedAudioDecoders[] = { BUF_AUDIO_MPEG, BUF_AUDIO_VORBIS }; | ||
619 | static const uint8_t preloadedAudioDecoderCount = sizeof( preloadedAudioDecoders ) / sizeof( preloadedAudioDecoders[ 0 ] ); | ||
620 | static const uint32_t preloadedVideoDecoders[] = { BUF_VIDEO_MPEG, BUF_VIDEO_MPEG4, BUF_VIDEO_DIVX5 }; | ||
621 | static const uint8_t preloadedVideoDecoderCount = sizeof( preloadedVideoDecoders ) / sizeof( preloadedVideoDecoders[ 0 ] ); | ||
622 | |||
623 | uint8_t i; | ||
624 | |||
625 | for ( i = 0; i < preloadedAudioDecoderCount; ++i ) { | ||
626 | audio_decoder_t *decoder = get_audio_decoder( stream, ( preloadedAudioDecoders[ i ] >> 16 ) & 0xff ); | ||
627 | free_audio_decoder( stream, decoder ); | ||
628 | } | ||
629 | |||
630 | for ( i = 0; i < preloadedVideoDecoderCount; ++i ) { | ||
631 | video_decoder_t *decoder = get_video_decoder( stream, ( preloadedVideoDecoders[ i ] >> 16 ) & 0xff ); | ||
632 | free_video_decoder( stream, decoder ); | ||
633 | } | ||
634 | } | ||
635 | |||