[FFmpeg-cvslog] lavu: add AVERROR_BUG error value

Luca Barbato git at videolan.org
Tue Dec 20 04:18:11 CET 2011


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Wed Dec 14 20:27:11 2011 +0100| [1ee5b5e823e3fe7e5599036bb057bfbcb3aa260c] | committer: Luca Barbato

lavu: add AVERROR_BUG error value

It should be used to mark codepath that can be reached only through
programming error.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1ee5b5e823e3fe7e5599036bb057bfbcb3aa260c
---

 libavutil/error.c |    1 +
 libavutil/error.h |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavutil/error.c b/libavutil/error.c
index ddcc038..a330e9f 100644
--- a/libavutil/error.c
+++ b/libavutil/error.c
@@ -38,6 +38,7 @@ int av_strerror(int errnum, char *errbuf, size_t errbuf_size)
     case AVERROR_PATCHWELCOME:      errstr = "Not yet implemented in Libav, patches welcome"; break;
     case AVERROR_PROTOCOL_NOT_FOUND:errstr = "Protocol not found"                           ; break;
     case AVERROR_STREAM_NOT_FOUND:  errstr = "Stream not found"                             ; break;
+    case AVERROR_BUG:               errstr = "Bug detected, please report the issue"        ; break;
     }
 
     if (errstr) {
diff --git a/libavutil/error.h b/libavutil/error.h
index 8ed7734..2db65cb 100644
--- a/libavutil/error.h
+++ b/libavutil/error.h
@@ -57,6 +57,7 @@
 #define AVERROR_PATCHWELCOME       (-MKTAG( 'P','A','W','E')) ///< Not yet implemented in Libav, patches welcome
 #define AVERROR_PROTOCOL_NOT_FOUND (-MKTAG(0xF8,'P','R','O')) ///< Protocol not found
 #define AVERROR_STREAM_NOT_FOUND   (-MKTAG(0xF8,'S','T','R')) ///< Stream not found
+#define AVERROR_BUG                (-MKTAG( 'B','U','G',' ')) ///< Bug detected, please report the issue
 
 /**
  * Put a description of the AVERROR code errnum in errbuf.



More information about the ffmpeg-cvslog mailing list