On Sat, Apr 12, 2008 at 11:01 PM, Michael Niedermayer <[EMAIL PROTECTED]> wrote: > 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. :) > > [...] > --
Why don't you just tell me what's wrong? I suggest you learn pedagogy. _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
