如何解释ffmpeg AVERROR [英] How to interprete ffmpeg AVERROR

查看:648
本文介绍了如何解释ffmpeg AVERROR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都知道AVERROR含义的列表在哪里?像

Anybody knows where is a list of the AVERROR meanings? Something like

-1: reason A
-2: reason B

以此类推?

推荐答案

在这里(摘录自 libavutil/error.c ):

{ ERROR_TAG(BSF_NOT_FOUND),      "Bitstream filter not found"                     },
{ ERROR_TAG(BUG),                "Internal bug, should not have happened"         },
{ ERROR_TAG(BUG2),               "Internal bug, should not have happened"         },
{ ERROR_TAG(BUFFER_TOO_SMALL),   "Buffer too small"                               },
{ ERROR_TAG(DECODER_NOT_FOUND),  "Decoder not found"                              },
{ ERROR_TAG(DEMUXER_NOT_FOUND),  "Demuxer not found"                              },
{ ERROR_TAG(ENCODER_NOT_FOUND),  "Encoder not found"                              },
{ ERROR_TAG(EOF),                "End of file"                                    },
{ ERROR_TAG(EXIT),               "Immediate exit requested"                       },
{ ERROR_TAG(EXTERNAL),           "Generic error in an external library"           },
{ ERROR_TAG(FILTER_NOT_FOUND),   "Filter not found"                               },
{ ERROR_TAG(INVALIDDATA),        "Invalid data found when processing input"       },
{ ERROR_TAG(MUXER_NOT_FOUND),    "Muxer not found"                                },
{ ERROR_TAG(OPTION_NOT_FOUND),   "Option not found"                               },
{ ERROR_TAG(PATCHWELCOME),       "Not yet implemented in FFmpeg, patches welcome" },
{ ERROR_TAG(PROTOCOL_NOT_FOUND), "Protocol not found"                             },
{ ERROR_TAG(STREAM_NOT_FOUND),   "Stream not found"                               },
{ ERROR_TAG(UNKNOWN),            "Unknown error occurred"                         },

但这是与版本有关的方式,最好使用av_strerror()让库为您提供错误代码的字符串表示形式.

But this is version-dependent way and it is better to use av_strerror() to let the library give you a string representation of the error code.

这篇关于如何解释ffmpeg AVERROR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆