Simplify print_error(), directly use av_strerror()/strerror() for
printing the error code associated to FF_NETERROR(EPROTONOSUPPORT). backport r23033 by stefano Originally committed as revision 23176 to svn://svn.ffmpeg.org/ffmpeg/branches/0.6
This commit is contained in:
parent
e0e0283778
commit
da8e4f5f79
@ -294,17 +294,9 @@ void print_error(const char *filename, int err)
|
|||||||
char errbuf[128];
|
char errbuf[128];
|
||||||
const char *errbuf_ptr = errbuf;
|
const char *errbuf_ptr = errbuf;
|
||||||
|
|
||||||
switch(err) {
|
|
||||||
#if CONFIG_NETWORK
|
|
||||||
case FF_NETERROR(EPROTONOSUPPORT):
|
|
||||||
fprintf(stderr, "%s: Unsupported network protocol\n", filename);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
default:
|
|
||||||
if (av_strerror(err, errbuf, sizeof(errbuf)) < 0)
|
if (av_strerror(err, errbuf, sizeof(errbuf)) < 0)
|
||||||
errbuf_ptr = strerror(AVUNERROR(err));
|
errbuf_ptr = strerror(AVUNERROR(err));
|
||||||
fprintf(stderr, "%s: %s\n", filename, errbuf_ptr);
|
fprintf(stderr, "%s: %s\n", filename, errbuf_ptr);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PRINT_LIB_VERSION(outstream,libname,LIBNAME,indent) \
|
#define PRINT_LIB_VERSION(outstream,libname,LIBNAME,indent) \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user