From 9465f22229692c0fc464c8688dcb0b544707b541 Mon Sep 17 00:00:00 2001 From: jakemsr Date: Sat, 24 Jan 2009 11:00:41 +0000 Subject: [PATCH] there's no reason to stop SDL from doing audio playback conversions --- graphics/ffmpeg/Makefile | 4 ++-- graphics/ffmpeg/patches/patch-ffplay_c | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 graphics/ffmpeg/patches/patch-ffplay_c diff --git a/graphics/ffmpeg/Makefile b/graphics/ffmpeg/Makefile index bdf5aba4fc5..60d4ed8e0b5 100644 --- a/graphics/ffmpeg/Makefile +++ b/graphics/ffmpeg/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.43 2009/01/24 10:31:15 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.44 2009/01/24 11:00:41 jakemsr Exp $ COMMENT= audio/video converter and streamer with bktr(4) support V= 20080620 DISTNAME= ffmpeg-svn-${V} -PKGNAME= ffmpeg-${V}p5 +PKGNAME= ffmpeg-${V}p6 SHARED_LIBS= avutil 6.0 \ avcodec 13.0 \ avformat 12.0 \ diff --git a/graphics/ffmpeg/patches/patch-ffplay_c b/graphics/ffmpeg/patches/patch-ffplay_c new file mode 100644 index 00000000000..cb040052f92 --- /dev/null +++ b/graphics/ffmpeg/patches/patch-ffplay_c @@ -0,0 +1,26 @@ +$OpenBSD: patch-ffplay_c,v 1.1 2009/01/24 11:00:41 jakemsr Exp $ +--- ffplay.c.orig Thu Jan 22 02:43:05 2009 ++++ ffplay.c Thu Jan 22 03:31:11 2009 +@@ -1684,7 +1684,7 @@ static int stream_component_open(VideoState *is, int s + AVFormatContext *ic = is->ic; + AVCodecContext *enc; + AVCodec *codec; +- SDL_AudioSpec wanted_spec, spec; ++ SDL_AudioSpec wanted_spec; + + if (stream_index < 0 || stream_index >= ic->nb_streams) + return -1; +@@ -1725,11 +1725,11 @@ static int stream_component_open(VideoState *is, int s + wanted_spec.samples = SDL_AUDIO_BUFFER_SIZE; + wanted_spec.callback = sdl_audio_callback; + wanted_spec.userdata = is; +- if (SDL_OpenAudio(&wanted_spec, &spec) < 0) { ++ if (SDL_OpenAudio(&wanted_spec, NULL) < 0) { + fprintf(stderr, "SDL_OpenAudio: %s\n", SDL_GetError()); + return -1; + } +- is->audio_hw_buf_size = spec.size; ++ is->audio_hw_buf_size = wanted_spec.size; + } + + if(thread_count>1)