id,summary,reporter,owner,description,type,status,priority,component,version,resolution,keywords,cc,blockedby,blocking,reproduced,analyzed
1654,3rd party app needs help with wma2 to pcm output,8086,,"Dear ffmpeg members,

    I want to implement a multimedia player based on FFmpeg. Now I wrote a app to decode out audio data from a media file, extracting raw pcm audio data. This app decodes mp3 and some video file successfully. Now I meet a wmv video file which can be decoded but the output pcm data is abnormal. The pcm data should be successive but it's always interrupted. The main API used is as follows:
avformat_open_input(&pCtx, opt.finput, 0, 0);
avformat_find_stream_info(pCtx, 0);
avcodec_find_decoder(pCodecCtx->codec_id);
avcodec_open2(pCodecCtx, pCodec, 0);
avcodec_alloc_frame(); 
av_read_frame(pCtx, &packet);
while()
{
  avcodec_decode_audio4(pCodecCtx, pFrame, &got, &packet);
  write(fd, pFrame->data[0], pFrame->linesize[0]);
}

The attachments is the raw pcm wave and the video file info.

App dump info:
Input #0, asf, from 'discovery.wmv':
  Metadata:
    WMFSDKVersion   : 9.00.00.3265
    WMFSDKNeeded    : 0.0.0.0000
    IsVBR           : 0
  Duration: 00:40:20.25, start: 0.000000, bitrate: 322 kb/s
    Stream #0:0(chi): Audio: wmav2 (a[1][0][0] / 0x0161), 32000 Hz, 2 channels, s16, 32 kb/s
    Stream #0:1(chi): Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 320x240, 284 kb/s, 25 tbr, 1k tbn, 1k tbc


",defect,closed,normal,avcodec,0.11.1,invalid,,,,,0,0
