History

avcodec/tak: Use void* instead of AVCodecContext* for logcontext

Avoids implicit inclusions of avcodec.h in lavf/takdec.c and lavc/tak.c.

Andreas Rheinhardt committed 3 years ago

Commit befb7e71 parent 00597af2 files · +4 −5Browse files

Showing the changes to libavcodec (2 of 2 files). Show all

Unified · Split

2 files
  1. libavcodec/tak.c +2 −2
  2. libavcodec/tak.h +2 −3
libavcodec/tak.c+2−2
@@ -144,11 +144,11 @@ int avpriv_tak_parse_streaminfo(TAKStreamInfo *s, const uint8_t *buf, int size) · 143 unmodified lines
144144 return tak_parse_streaminfo(s, &gb);
145145 }
146146
147−int ff_tak_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb,
147+int ff_tak_decode_frame_header(void *logctx, GetBitContext *gb,
148148 TAKStreamInfo *ti, int log_level_offset)
149149 {
150150 if (get_bits(gb, TAK_FRAME_HEADER_SYNC_ID_BITS) != TAK_FRAME_HEADER_SYNC_ID) {
151− av_log(avctx, AV_LOG_ERROR + log_level_offset, "missing sync id\n");
151+ av_log(logctx, AV_LOG_ERROR + log_level_offset, "missing sync id\n");
152152 return AVERROR_INVALIDDATA;
153153 }
154154
libavcodec/tak.h+2−3
@@ -29,7 +29,6 @@ · 28 unmodified lines
2929
3030 #include <stdint.h>
3131
32−#include "avcodec.h"
3332 #include "get_bits.h"
3433
3534 #define TAK_FORMAT_DATA_TYPE_BITS 3
@@ -151,13 +150,13 @@ int avpriv_tak_parse_streaminfo(TAKStreamInfo *s, const uint8_t *buf, int size); · 115 unmodified lines
151150
152151 /**
153152 * Validate and decode a frame header.
154− * @param avctx AVCodecContext to use as av_log() context
153+ * @param logctx for use as av_log() context
155154 * @param[in] gb GetBitContext from which to read frame header
156155 * @param[out] s frame information
157156 * @param log_level_offset log level offset, can be used to silence
158157 * error messages.
159158 * @return non-zero on error, 0 if OK
160159 */
161−int ff_tak_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb,
160+int ff_tak_decode_frame_header(void *logctx, GetBitContext *gb,
162161 TAKStreamInfo *s, int log_level_offset);
163162 #endif /* AVCODEC_TAK_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t