[FFmpeg-devel] [PATCH]ExtraData computation for aac in -acodec copy

Sailaja Mahendrakar smahendrakar at rgbnetworks.com
Tue Sep 1 16:34:12 CEST 2015


Thank you for the comments Carl!
I have applied the review comments and attached is the updated patch.

Sailaja

-----Original Message-----
From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf Of Carl Eugen Hoyos
Sent: Tuesday, September 01, 2015 2:37 AM
To: ffmpeg-devel at ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH]ExtraData computation for aac in -acodec copy

Sailaja Mahendrakar <smahendrakar <at> rgbnetworks.com> writes:

> Please find attached the patch for ExtraData computation for aac in 
> -acodec copy.  With audio codec copy, there is no extradata 
> computation and RTMP fails with no audio in playback.

I don't know if it is acceptable what the patch does, so please wait for a review from an api expert, but before the patch can be applied, please fix the style to make it similar to the rest of the file:

> +    if(avctx->extradata_size == 2)
> +    {

This should be on one line, same below (and for "else").

> if((avctx->sample_rate>>1) == a)

Most people here find it much more readable with spaces but without the extra parenthesis, as in:
if (avctx->sample_rate >> 1 == a)

> +            temp = 0x48;
> +            put_bits(&pb, 8, temp);                        // 5th Byte

Imo, this gets much more readable without the temp variable.

> +       avctx->extradata = av_mallocz(avctx->extradata_size);

Needs a check for OOM.

> +          av_log(NULL

The context should not be NULL.

Carl Eugen

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ExtradataPassthruCopyTsWithComments.patch
Type: application/octet-stream
Size: 6923 bytes
Desc: ExtradataPassthruCopyTsWithComments.patch
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150901/cd7fef53/attachment.obj>


More information about the ffmpeg-devel mailing list