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
144 return tak_parse_streaminfo(s, &gb);144 return tak_parse_streaminfo(s, &gb);
145}145}
146 146
147int ff_tak_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb,147int ff_tak_decode_frame_header(void *logctx, GetBitContext *gb,
148 TAKStreamInfo *ti, int log_level_offset)148 TAKStreamInfo *ti, int log_level_offset)
149{149{
150 if (get_bits(gb, TAK_FRAME_HEADER_SYNC_ID_BITS) != TAK_FRAME_HEADER_SYNC_ID) {150 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");
152 return AVERROR_INVALIDDATA;152 return AVERROR_INVALIDDATA;
153 }153 }
154 154
libavcodec/tak.h+2−3
@@ -29,7 +29,6 @@ · 28 unmodified lines
29 29
30#include <stdint.h>30#include <stdint.h>
31 31
32#include "avcodec.h"
33#include "get_bits.h"32#include "get_bits.h"
34 33
35#define TAK_FORMAT_DATA_TYPE_BITS 334#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
151 150
152/**151/**
153 * Validate and decode a frame header.152 * Validate and decode a frame header.
154 * @param avctx AVCodecContext to use as av_log() context153 * @param logctx for use as av_log() context
155 * @param[in] gb GetBitContext from which to read frame header154 * @param[in] gb GetBitContext from which to read frame header
156 * @param[out] s frame information155 * @param[out] s frame information
157 * @param log_level_offset log level offset, can be used to silence156 * @param log_level_offset log level offset, can be used to silence
158 * error messages.157 * error messages.
159 * @return non-zero on error, 0 if OK158 * @return non-zero on error, 0 if OK
160 */159 */
161int ff_tak_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb,160int ff_tak_decode_frame_header(void *logctx, GetBitContext *gb,
162 TAKStreamInfo *s, int log_level_offset);161 TAKStreamInfo *s, int log_level_offset);
163#endif /* AVCODEC_TAK_H */162#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