Ticket #1722: trunk.patch

File trunk.patch, 1020 bytes (added by mplayer.hu@…, 16 years ago)

Proposed fix

  • stream/stream_radio.c

    old new  
    12011201
    12021202#if defined(CONFIG_RADIO_CAPTURE) && defined(CONFIG_STREAM_CACHE)
    12031203    if(priv->do_capture){
    1204         //5 second cache
    1205         if(!stream_enable_cache(stream,5*priv->audio_in.samplerate*priv->audio_in.channels*
    1206                 priv->audio_in.bytes_per_sample,2*priv->audio_in.samplerate*priv->audio_in.channels*
    1207                 priv->audio_in.bytes_per_sample,priv->audio_in.blocksize)) {
    1208             mp_msg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_StreamEnableCacheFailed,strerror(errno));
     1204        stream->streaming_ctrl = streaming_ctrl_new();
     1205        if (!stream->streaming_ctrl) {
    12091206            close_s(stream);
    12101207            return STREAM_ERROR;
    12111208        }
     1209
     1210        stream->streaming_ctrl->buffering = 1;
     1211        stream->streaming_ctrl->prebuffer_size = 192 * 1024; // Works for me
     1212
     1213        fixup_network_stream_cache (stream);
    12121214    }
    12131215#endif
    12141216