Playing mp3 audio files

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Playing mp3 audio files

Michelle Cannon
Hi,
  When i am playing mp3 songs some songs are played successfully but some songs are not playing.It Works for all other formats but the problem with mp3 songs.
   Here i am decoding audio like below
         avcodec_decode_audio4(dec_ctx, frame, &got_frame,
                                                &packet);
  I am not converting any  AV_SAMPLE_FMT_U8 to AV_SAMPLE_FMT_S16.My question is
   
     1.Is it required to convert AV_SAMPLE_FMT_U8 to AV_SAMPLE_FMT_S16 for playing all mp3 songs
     2.or any other libraries are required for playing all mp3 song like libmp3 lame
     
  Please provide any information about this issue or provide any sample code.