第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如下是一個FFmpeg測試程序,出現RT的錯誤,怎么辦?

如下是一個FFmpeg測試程序,出現RT的錯誤,怎么辦?

UYOU 2022-07-01 07:07:09
#define inline _inline#ifndef INT64_C#define INT64_C(c) (c ## LL)#define UINT64_C(c) (c ## ULL)#endif#ifdef __cplusplusextern "C" {#endif#include <libavformat/avformat.h>#include <libavcodec/avcodec.h>#include <libswscale/swscale.h>#ifdef __cplusplus}#endif#include <stdio.h>static void SaveFrame(AVFrame *pFrame, int width, int height, int iFrame);int main (int argc, const char * argv[]){char* filename = "E:\\A.mp4";AVFormatContext *pFormatCtx = NULL;int i, videoStream;AVCodecContext *pCodecCtx;AVCodec *pCodec;AVFrame *pFrame;AVFrame *pFrameRGB;AVPacket packet;int frameFinished;int numBytes;uint8_t *buffer;// Register all formats and codecsav_register_all();// Open video file//if(avformat_open_input(&pFormatCtx, argv[1], NULL, NULL)!=0)if(avformat_open_input(&pFormatCtx, filename, NULL, NULL)!=0)return -1; // Couldn't open file// Retrieve stream informationif(av_find_stream_info(pFormatCtx)<0)return -1; // Couldn't find stream information// Dump information about file onto standard errorav_dump_format(pFormatCtx, 0, filename, false);return 0;}
查看完整描述

1 回答

?
慕碼人2483693

TA貢獻1860條經驗 獲得超9個贊

用 avformat_find_stream_info 代替,由于ffmpeg 版本不同,新版本的會把老版本的一些函數摒棄或者刪除掉。一般都有替代函數可選。

查看完整回答
反對 回復 2022-07-05
  • 1 回答
  • 0 關注
  • 162 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號