[FFmpeg-cvslog] r15536 - trunk/libavformat/mov.c

Michael Niedermayer michaelni
Sat Oct 4 03:19:35 CEST 2008


On Fri, Oct 03, 2008 at 09:37:42PM +0200, bcoudurier wrote:
> Author: bcoudurier
> Date: Fri Oct  3 21:37:41 2008
> New Revision: 15536
> 
> Log:
> set sample rate for amr to allow stream copy since no decoder is present,
> 3gp does not store sample rate in stsd in fact. Fixes #674.
> 
> 
> Modified:
>    trunk/libavformat/mov.c
> 
> Modified: trunk/libavformat/mov.c
> ==============================================================================
> --- trunk/libavformat/mov.c	(original)
> +++ trunk/libavformat/mov.c	Fri Oct  3 21:37:41 2008
> @@ -991,6 +991,9 @@ static int mov_read_stsd(MOVContext *c, 
>      case CODEC_ID_AMR_WB:
>          st->codec->frame_size= sc->samples_per_frame;
>          st->codec->channels= 1; /* really needed */
> +        /* force sample rate for amr, stsd in 3gp does not store sample rate */
> +        if (st->codec->codec_id != CODEC_ID_QCELP)
> +            st->codec->sample_rate = 8000;
>          break;

I was wondering if not maybe something like
if(!st->codec->sample_rate)
    st->codec->sample_rate = 8000;
or
if(3gp)
    st->codec->sample_rate = 8000;
would be cleaner ?

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

No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- 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-cvslog/attachments/20081004/258e9374/attachment.pgp>



More information about the ffmpeg-cvslog mailing list