On Thu, Apr 10, 2008 at 10:46:38AM +0200, jujulj wrote:
> On Wed, Apr 9, 2008 at 11:21 PM, Michael Niedermayer <[EMAIL PROTECTED]> 
> wrote:
> >
> > 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?
[...]
> 
> Yes, 

Ohh this is bad, i suggest you learn C. Especially the difference between
bytes and int16_t. :)

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

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates

Attachment: signature.asc
Description: Digital signature

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

Reply via email to