summaryrefslogtreecommitdiff
path: root/libs/ffvpx/libavcodec/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ffvpx/libavcodec/internal.h')
-rw-r--r--libs/ffvpx/libavcodec/internal.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/libs/ffvpx/libavcodec/internal.h b/libs/ffvpx/libavcodec/internal.h
index bb92873d7..5096ffa1d 100644
--- a/libs/ffvpx/libavcodec/internal.h
+++ b/libs/ffvpx/libavcodec/internal.h
@@ -83,7 +83,7 @@
#define FF_QSCALE_TYPE_H264 2
#define FF_QSCALE_TYPE_VP56 3
-#define FF_SANE_NB_CHANNELS 64U
+#define FF_SANE_NB_CHANNELS 256U
#define FF_SIGNBIT(x) ((x) >> CHAR_BIT * sizeof(x) - 1)
@@ -218,6 +218,14 @@ typedef struct AVCodecInternal {
/* to prevent infinite loop on errors when draining */
int nb_draining_errors;
+
+ /* used when avctx flag AV_CODEC_FLAG_DROPCHANGED is set */
+ int changed_frames_dropped;
+ int initial_format;
+ int initial_width, initial_height;
+ int initial_sample_rate;
+ int initial_channels;
+ uint64_t initial_channel_layout;
} AVCodecInternal;
struct AVCodecDefault {
@@ -404,6 +412,18 @@ int ff_alloc_a53_sei(const AVFrame *frame, size_t prefix_len,
*/
int64_t ff_guess_coded_bitrate(AVCodecContext *avctx);
+/**
+ * Check if a value is in the list. If not, return the default value
+ *
+ * @param ctx Context for the log msg
+ * @param val_name Name of the checked value, for log msg
+ * @param array_valid_values Array of valid int, ended with INT_MAX
+ * @param default_value Value return if checked value is not in the array
+ * @return Value or default_value.
+ */
+int ff_int_from_list_or_default(void *ctx, const char * val_name, int val,
+ const int * array_valid_values, int default_value);
+
#if defined(_WIN32) && CONFIG_SHARED && !defined(BUILDING_avcodec)
# define av_export_avcodec __declspec(dllimport)
#else