On Fri, Apr 04, 2008 at 02:09:00PM +0200, jujulj wrote:
> On Fri, Apr 4, 2008 at 1:23 PM, Michel Bardiaux <[EMAIL PROTECTED]> wrote:
> >
> >  Please dont top-post; trim old sigs and similar cruft when replying; and
> >    preferrably post complete code that one can compile and try without a
> >  lot of effort.
> >
> 
> ok, sorry. Here's a clean post.
> 
> My problem: I'm getting twice as many decoded values as expected, and
> 0s in the second half of every decoded frame...
> My easily compilable and triable code is attached. It creates
> /tmp/decoded_samples.dat and printf the number of decoded values.
[...]
>     //output buffer 
>     int16_t *output_buf;
>     output_buf= new int16_t[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3)/2];    
[...]
>                 bytesDecoded = avcodec_decode_audio2(pAudioCodecCtx, 
> output_buf, &numAudioBytes, pIn , audioBytesRemaining);
[...]
>                             for(int j=0;j<numAudioBytes;j++)
>                                     fprintf(outfile,"%d\n",output_buf[j]);

so half of the int16_t bytes are 0?

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope

Attachment: signature.asc
Description: Digital signature

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to