av_read_frame
-
FFmpeg으로 재생하는 프로그램 만들기Streaming Media/Media Tools 2013. 6. 20. 11:30
선행 학습FFmpeg으로 미디어 스트림 열기 예제 코드 static AVFormatContext *fmt_ctx = NULL; void play() { AVStream *st; AVPacket pkt; AVFrame *frm = av_frame_alloc(); int got_frame; while (1) { av_read_frame(fmt_ctx, &pkt); st = fmt_ctx->streams[pkt.stream_index]; avcodec_get_frame_defaults(frm); switch (st->codec->codec_type) { case AVMEDIA_TYPE_AUDIO: avcodec_decode_audio4(st->codec, frm, &got_frame, &pkt); break;..