This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int save_frame_as_jpeg(AVCodecContext *pCodecCtx, AVFrame *pFrame, int FrameNo) { | |
| AVCodec *jpegCodec = avcodec_find_encoder(AV_CODEC_ID_JPEG2000); | |
| if (!jpegCodec) { | |
| return -1; | |
| } | |
| AVCodecContext *jpegContext = avcodec_alloc_context3(jpegCodec); | |
| if (!jpegContext) { | |
| return -1; | |
| } |