调用av_read_frame返回的错误码

原博客:https://blog.csdn.net/lipengshiwo/article/details/52610168

首先上代码:

[cpp]  view plain  copy
  1. #include <stdio.h>  
  2.   
  3. #define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))  
  4.   
  5.   
  6. #define FFERRTAG(a, b, c, d) (-(int)MKTAG(a, b, c, d))  
  7.   
  8. #define AVERROR_BSF_NOT_FOUND      FFERRTAG(0xF8,'B','S','F') ///< Bitstream filter not found  
  9. #define AVERROR_BUG                FFERRTAG( 'B','U','G','!') ///< Internal bug, also see AVERROR_BUG2  
  10. #define AVERROR_BUFFER_TOO_SMALL   FFERRTAG( 'B','U','F','S') ///< Buffer too small  
  11. #define AVERROR_DECODER_NOT_FOUND  FFERRTAG(0xF8,'D','E','C') ///< Decoder not found  
  12. #define AVERROR_DEMUXER_NOT_FOUND  FFERRTAG(0xF8,'D','E','M') ///< Demuxer not found  
  13. #define AVERROR_ENCODER_NOT_FOUND  FFERRTAG(0xF8,'E','N','C') ///< Encoder not found  
  14. #define AVERROR_EOF                FFERRTAG( 'E','O','F',' ') ///< End of file  
  15. #define AVERROR_EXIT               FFERRTAG( 'E','X','I','T') ///< Immediate exit was requested; the called function should not be restarted  
  16. #define AVERROR_EXTERNAL           FFERRTAG( 'E','X','T',' ') ///< Generic error in an external library  
  17. #define AVERROR_FILTER_NOT_FOUND   FFERRTAG(0xF8,'F','I','L') ///< Filter not found  
  18. #define AVERROR_INVALIDDATA        FFERRTAG( 'I','N','D','A') ///< Invalid data found when processing input  
  19. #define AVERROR_MUXER_NOT_FOUND    FFERRTAG(0xF8,'M','U','X') ///< Muxer not found  
  20. #define AVERROR_OPTION_NOT_FOUND   FFERRTAG(0xF8,'O','P','T') ///< Option not found  
  21. #define AVERROR_PATCHWELCOME       FFERRTAG( 'P','A','W','E') ///< Not yet implemented in FFmpeg, patches welcome  
  22. #define AVERROR_PROTOCOL_NOT_FOUND FFERRTAG(0xF8,'P','R','O') ///< Protocol not found  
  23.   
  24. #define AVERROR_STREAM_NOT_FOUND   FFERRTAG(0xF8,'S','T','R') ///< Stream not found  
  25.   
  26.   
  27. int main(void)  
  28. {  
  29.     printf("AVERROR_BSF_NOT_FOUND: %d\n", AVERROR_BSF_NOT_FOUND);  
  30.     printf("AVERROR_BUG: %d\n", AVERROR_BUG);  
  31.     printf("AVERROR_BUFFER_TOO_SMALL: %d\n",AVERROR_BUFFER_TOO_SMALL);  
  32.     printf("AVERROR_DECODER_NOT_FOUND: %d\n", AVERROR_DECODER_NOT_FOUND);  
  33.     printf("AVERROR_DEMUXER_NOT_FOUND: %d\n", AVERROR_DEMUXER_NOT_FOUND);  
  34.     printf("AVERROR_ENCODER_NOT_FOUND: %d\n", AVERROR_ENCODER_NOT_FOUND);  
  35.     printf("AVERROR_EOF: %d\n", AVERROR_EOF);  
  36.     printf("AVERROR_EXIT: %d\n", AVERROR_EXIT);  
  37.     printf("AVERROR_EXTERNAL: %d\n", AVERROR_EXTERNAL);  
  38.     printf("AVERROR_FILTER_NOT_FOUND: %d\n", AVERROR_FILTER_NOT_FOUND);  
  39.     printf("AVERROR_INVALIDDATA: %d\n", AVERROR_INVALIDDATA);  
  40.     printf("AVERROR_MUXER_NOT_FOUND: %d\n", AVERROR_MUXER_NOT_FOUND);  
  41.     printf("AVERROR_OPTION_NOT_FOUND: %d\n", AVERROR_OPTION_NOT_FOUND);  
  42.     printf("AVERROR_PATCHWELCOME: %d\n", AVERROR_PATCHWELCOME);  
  43.     printf("AVERROR_PROTOCOL_NOT_FOUND: %d\n", AVERROR_PROTOCOL_NOT_FOUND);  
  44.     printf("AVERROR_STREAM_NOT_FOUND: %d\n", AVERROR_STREAM_NOT_FOUND);  
  45.     return 0;  
  46. }  


返回值信息:

[html]  view plain  copy
  1. AVERROR_BSF_NOT_FOUND: -1179861752  
  2. AVERROR_BUG: -558323010  
  3. AVERROR_BUFFER_TOO_SMALL: -1397118274  
  4. AVERROR_DECODER_NOT_FOUND: -1128613112  
  5. AVERROR_DEMUXER_NOT_FOUND: -1296385272  
  6. AVERROR_ENCODER_NOT_FOUND: -1129203192  
  7. AVERROR_EOF: -541478725  
  8. AVERROR_EXIT: -1414092869  
  9. AVERROR_EXTERNAL: -542398533  
  10. AVERROR_FILTER_NOT_FOUND: -1279870712  
  11. AVERROR_INVALIDDATA: -1094995529  
  12. AVERROR_MUXER_NOT_FOUND: -1481985528  
  13. AVERROR_OPTION_NOT_FOUND: -1414549496  
  14. AVERROR_PATCHWELCOME: -1163346256  
  15. AVERROR_PROTOCOL_NOT_FOUND: -1330794744  
  16. AVERROR_STREAM_NOT_FOUND: -1381258232  

补充一部分报错信息:

[html]  view plain  copy
  1. </pre><p><pre name="code" class="html">DumpErrorCodes - Error Code : AVERROR_BUG2 = -541545794  
  2. DumpErrorCodes - Error Code : AVERROR_UNKNOWN = -1313558101  
  3. DumpErrorCodes - Error Code : AVERROR_EXPERIMENTAL = -733130664  
  4. DumpErrorCodes - Error Code : AVERROR_INPUT_CHANGED = -1668179713  
  5. DumpErrorCodes - Error Code : AVERROR_OUTPUT_CHANGED = -1668179714  
  6. DumpErrorCodes - Error Code : AVERROR_HTTP_BAD_REQUEST = -808465656  
  7. DumpErrorCodes - Error Code : AVERROR_HTTP_UNAUTHORIZED = -825242872  
  8. DumpErrorCodes - Error Code : AVERROR_HTTP_FORBIDDEN = -858797304  
  9. DumpErrorCodes - Error Code : AVERROR_HTTP_NOT_FOUND = -875574520  
  10. DumpErrorCodes - Error Code : AVERROR_HTTP_OTHER_4XX = -1482175736  
  11. DumpErrorCodes - Error Code : AVERROR_HTTP_SERVER_ERROR = -1482175992  
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值