<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type></HEAD>
<BODY>
<DIV>
<DIV style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">Thx dude I figured it out. D sample didnt had the if statement where audio stream was beeng checked and that was it. Really silly of me.<BR>Is there a way to get fixed number of sampels frm ffmpeg. The default I am getting decoded are 1024bytes of chunk which forms 1536sampels. I traversed 3times and got 4608sampels data.. But I need to decide 19200bytes ie. 4800sampels, so I am short of 192sampels. Is there a way to get those 192 sampels</DIV></DIV>
<DIV dir=ltr>
<HR>
<SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">From: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif"><A href="mailto:p.tushar99@gmail.com">Tushar Paithankar</A></SPAN><BR><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">Sent: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">‎09-‎05-‎2014 04:41 PM</SPAN><BR><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">To: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif"><A href="mailto:libav-user@ffmpeg.org">This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter.</A></SPAN><BR><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">Subject: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">Re: [Libav-user] Audio decoding error</SPAN><BR><BR></DIV>
<DIV dir=ltr>
<DIV>
<DIV>
<DIV>
<DIV>Hi Ankush,<BR><BR></DIV>Try using AV_CODEC_ID_MP3 rather than AV_CODEC_ID_MP2 , I have implemented the MP3 Decoder using ffmpeg and it is working fine.<BR><BR><BR></DIV>Let me know if you have any further problem n please share issue in detail..<BR><BR><BR><BR></DIV>Thanks <BR></DIV>Tushar<BR></DIV>
<DIV class=gmail_extra><BR><BR>
<DIV class=gmail_quote>On 9 May 2014 09:01, Ankush <SPAN dir=ltr><<A href="mailto:wadkes93@gmail.com" target=_blank>wadkes93@gmail.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV>
<DIV>
<DIV style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">I am currently trying to read the audio samples from a video file. I <BR>tried the sample code provided in the examples section <BR>decoding_encoding.c and i only changed the <BR>avcodec_find_decoder(AV_CODEC_ID_MP2) to <BR>avcodec_find_decoder(pCodecCtx->codec_id), everything works fine with <BR>this till i reach the avcodec_decode_audio4() where i get a negative <BR>value from this function.<BR>I managed my way through video decoding sucesfully but seem to be <BR>stucked here from a long time. i tried with .mts and .mp4 file and even <BR>.mp3 file but all seem to return a negative value.<BR><BR>Thank you.</DIV></DIV></DIV><BR>_______________________________________________<BR>Libav-user mailing list<BR><A href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</A><BR><A href="http://ffmpeg.org/mailman/listinfo/libav-user" target=_blank>http://ffmpeg.org/mailman/listinfo/libav-user</A><BR><BR></BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>