Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// read stream
- ///
- AVPacket pkt;
- AVFrame frame;
- av_frame_alloc(&frame);
- int gotFrame;
- int gotPacket;
- while (av_read_frame(pFormatCtx, &pkt) >= 0) {
- avcodec_decode_audio4(&pDecoderCtx, &frame, &gotFrame, &pkt);
- avcodec_encode_audio2(&pEncoderCtx, &pkt, &frame, &gotPacket);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement