[MPlayer-dev-eng] [PATCH] improving MP3 detection

The Wanderer inverseparadox at comcast.net
Thu Sep 9 12:14:30 CEST 2004


Reimar Döffinger wrote:

> Hi,
> the following patch improves MP3 detection. It is a bit more
> complicated, because it avoids seeking backwards as much as possible.
> Even with linear streams only as many frames as neccessary for
> reliable detection will be skipped.
> Please comment.

> @@ -264,9 +316,22 @@
>    sh_audio->samplerate = sh_audio->audio.dwRate;
>  
>    if(stream_tell(s) != demuxer->movi_start)
> +  {
> +    mp_msg(MSGT_DEMUX, MSGL_V, "demux_audio: seeking from 0x%X to start pos 0x%X\n",
> +            (int)stream_tell(s), (int)demuxer->movi_start);
>      stream_seek(s,demuxer->movi_start);
> +    if (stream_tell(s) != demuxer->movi_start) {
> +      mp_msg(MSGT_DEMUX, MSGL_V, "demux_audio: seeking failed, now at 0x%X!\n",
> +              (int)stream_tell(s));
> +      if (next_frame_pos) {
> +        mp_msg(MSGT_DEMUX, MSGL_V, "demux_audio: seeking to 0x%X instead\n",
> +                next_frame_pos);
> +        stream_seek(s, next_frame_pos);
> +      }
> +    }
> +  }
>  
> -  mp_msg(MSGT_DEMUX,MSGL_V,"demux_audio: audio data 0x%X - 0x%X  \n",demuxer->movi_start,demuxer->movi_end);
> +  mp_msg(MSGT_DEMUX,MSGL_V,"demux_audio: audio data 0x%X - 0x%X  \n",(int)demuxer->movi_start,(int)demuxer->movi_end);

My only objection to this patch, as the one who will most likely wind up
correcting the matter, is that it adds translatable strings as hardcoded
rather than putting them in the translation file. AFAIK MSGL_V does need
to be translated...? If not, many of the strings I moved should probably
have been left alone, and I'd like to know about it to avoid unnecessary
work in the future.

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

A government exists to serve its citizens, not to control them.




More information about the MPlayer-dev-eng mailing list