[MPlayer-users] [PATCH] crash in libavcodec/i386/dsputil_mmx.c:float_to_int16_sse2
Ray Kohler
ataraxia at cmu.edu
Sat Jul 12 18:45:15 CEST 2008
On Jul 12, 2008, at 3:07 AM, Reimar Döffinger wrote:
> Hello,
> On Sat, Jul 12, 2008 at 01:34:17AM -0400, Ray Kohler wrote:
>> My solution here is to make ao_macosx lie about the free space in the
>> buffer by rounding down to a multiple of 16.
>
> Thanks, good idea, but it is the wrong place, since -ao alsa has the
> same problem, doing this change in every ao is not a good idea.
> Also, it probably is more a quick hack than a reliable fix, but I will
> have to spend some more time on it to find out...
The other way I considered doing this is by doing the rounding in
fill_audio_out_buffers() after returning from get_space(). This at
least avoids doing it to every AO (or even every affected AO) but it's
still a hack. A "deep fix" here would probably involve decoupling the
amount of audio decoded from the change in value of
sh_audio_t.a_buffer_len, but that's deeper than I feel confident that
I can get right.
Index: mplayer.c
===================================================================
--- mplayer.c (revision 27270)
+++ mplayer.c (working copy)
@@ -2023,6 +2023,7 @@
// in get_space()
ao_data.pts = ((mpctx->sh_video?mpctx->sh_video->timer:0)+mpctx-
>delay)*90000.0;
bytes_to_write = mpctx->audio_out->get_space();
+ bytes_to_write -= (bytes_to_write % 16);
if (mpctx->sh_video || bytes_to_write >= ao_data.outburst)
break;
More information about the MPlayer-users
mailing list