Skip to content

Commit 5133c67

Browse files
committed
Make av::frame::set_channel_layout available again
1 parent 93f7f83 commit 5133c67

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/avcpp/frame.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ int64_t get_best_effort_timestamp(const AVFrame* frame) {
101101
}
102102

103103
// Based on db6efa1815e217ed76f39aee8b15ee5c64698537
104-
static inline uint64_t get_channel_layout(const AVFrame* frame) {
104+
uint64_t get_channel_layout(const AVFrame* frame) {
105105
#if AVCPP_AVUTIL_VERSION_MAJOR < 56 // < FFmpeg 4.0
106106
return static_cast<uint64_t>(av_frame_get_channel_layout(frame));
107107
#elif AVCPP_API_NEW_CHANNEL_LAYOUT
@@ -111,7 +111,7 @@ static inline uint64_t get_channel_layout(const AVFrame* frame) {
111111
#endif
112112
}
113113

114-
static inline void set_channel_layout(AVFrame* frame, uint64_t layout) {
114+
void set_channel_layout(AVFrame* frame, uint64_t layout) {
115115
#if AVCPP_AVUTIL_VERSION_MAJOR < 56 // < FFmpeg 4.0
116116
av_frame_set_channel_layout(frame, static_cast<int64_t>(layout));
117117
#elif AVCPP_API_NEW_CHANNEL_LAYOUT

src/avcpp/frame.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ namespace av
2929
namespace frame
3030
{
3131
int64_t get_best_effort_timestamp(const AVFrame* frame);
32+
uint64_t get_channel_layout(const AVFrame* frame);
33+
void set_channel_layout(AVFrame* frame, uint64_t layout);
3234
} // ::av::frame
3335

3436
#if AVCPP_HAS_FRAME_SIDE_DATA

0 commit comments

Comments
 (0)