Q:

Audio is not playing properly in ffmpeg player

I need to create a player which will decrypt the input on-fly and play the content.
I have choosen ffmpeg libs (libav*) to create player and to start I have followed this link
but audio is not playing properly,video is playing fine. 
I am using ubuntu 12.04LTS 64bit OS with the following ffmpeg version,
admin@vz-X401A1:~$ ffmpeg 
ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
  built on Sep 11 2013 13:46:26 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --prefix=/home/admin/ffmpeg_build --extra-cflags=-I/home/admin/ffmpeg_build/include --extra-ldflags=-L/home/admin/ffmpeg_build/lib --bindir=/home/admin/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab
  libavutil      52. 43.100 / 52. 43.100
  libavcodec     55. 31.101 / 55. 31.101
  libavformat    55. 16.102 / 55. 16.102
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 84.100 /  3. 84.100
  libswscale      2.  5.100 /  2.  5.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'
admin@vz-X401A1:~$

and downloaded tutorial07.c from this link
still, with this also, sound is not playing properly.
I need help to solve the following issues,

How can I fix this audio issue(I have gone through similar question in StackOverflow and installed old ver. of ffmpeg, but issue still remains).
And also suggest some steps or tutorial, how to implement on-fly decryption process (in C) and integrate this with the player.

A:

I have solved my problem using old version of ffmpeg(ffmpeg version 1.0.1) without code altering. It can also be solved by appending audio resampling module with latest ffmpeg version.

