[FFmpeg-devel] [PATCH] mp3 in oma support

Michael Niedermayer michaelni
Sun Jun 22 23:42:35 CEST 2008


On Sun, Jun 22, 2008 at 10:54:44PM +0200, Benjamin Larsson wrote:
> $topic
> 
> MvH
> Benjamin Larsson

[...]
> @@ -111,8 +117,8 @@
>  
>              framesize = (codec_params & 0x3FF) * 8;
>              jsflag = (codec_params >> 17) & 1; /* get stereo coding mode, 1 for joint-stereo */
> -            channel_id = 2;
> -
> +            st->codec->channels = 2;

If the channel_id is just valid for one codec then the respective code
should be in the specific case in the swicth, the same applies to the
sample rate


[...]
> +        case OMA_CODECID_MP3:
> +	    {
> +            uint32_t header;
> +
> +            url_fseek(s->pb, EA3_pos + EA3_HEADER_SIZE, SEEK_SET);
> +            ret = get_buffer(s->pb, buf, 4);
> +            header = AV_RB32(buf);
> +            framesize = ff_mpa_decode_header(st->codec,header,&samplerate);
> +            if(framesize==-1) {
> +                av_log(s, AV_LOG_ERROR, "Valid MP3 header not found!\n");
> +                return -1;
> +            }
> +            st->need_parsing = AVSTREAM_PARSE_FULL;
> +            break;
> +        }

except need_parsing this looks unneeded


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080622/ab5c1d8c/attachment.pgp>



More information about the ffmpeg-devel mailing list