Skip to content

Commit 31d275e

Browse files
author
Clement Champetier
committed
common: define AV_ERROR_MAX_STRING_SIZE in cpp
1 parent 7f63c93 commit 31d275e

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/AvTranscoder/common.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ extern "C" {
55
#include <libavutil/error.h>
66
}
77

8+
#ifndef AV_ERROR_MAX_STRING_SIZE
9+
#define AV_ERROR_MAX_STRING_SIZE 64
10+
#endif
11+
812
namespace avtranscoder
913
{
1014

src/AvTranscoder/common.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ extern "C" {
3434
#endif
3535
#endif
3636

37-
#ifndef AV_ERROR_MAX_STRING_SIZE
38-
#define AV_ERROR_MAX_STRING_SIZE 64
39-
#endif
40-
4137
#ifndef SWIG
4238
#if LIBAVCODEC_VERSION_MAJOR < 54
4339
#define AVPixelFormat PixelFormat

src/AvTranscoder/decoder/VideoDecoder.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ bool VideoDecoder::decodeNextFrame()
9494

9595
if( ret < 0 )
9696
{
97-
char err[AV_ERROR_MAX_STRING_SIZE];
98-
av_strerror( ret, err, sizeof(err) );
9997
throw std::runtime_error( "an error occured during video decoding - " + getDescriptionFromErrorCode( ret ) );
10098
}
10199
}

0 commit comments

Comments
 (0)