Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1.     /// read stream
  2.     ///
  3.     AVPacket pkt;
  4.     AVFrame frame;
  5.     av_frame_alloc(&frame);
  6.     int gotFrame;
  7.     int gotPacket;
  8.     while (av_read_frame(pFormatCtx, &pkt) >= 0) {
  9.         avcodec_decode_audio4(&pDecoderCtx, &frame, &gotFrame, &pkt);
  10.         avcodec_encode_audio2(&pEncoderCtx, &pkt, &frame, &gotPacket);
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement