<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="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<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>