avformat/avformat: use the side data from AVStream.codecpar

Deprecate AVStream.side_data and its helpers in favor of the AVStream's
codecpar.coded_side_data.

This will considerably simplify the propagation of global side data to decoders
and from encoders. Instead of having to do it inside packets, it will be
available during init().
Global and frame specific side data will therefore be distinct.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2023-07-16 17:57:26 -03:00
parent 21d7cc6fa9
commit 5432d2aaca
27 changed files with 339 additions and 253 deletions

View File

@@ -147,7 +147,9 @@ typedef struct FFFormatContext {
int missing_ts_warning;
#endif
#if FF_API_AVSTREAM_SIDE_DATA
int inject_global_side_data;
#endif
int avoid_negative_ts_use_pts;
@@ -356,10 +358,12 @@ typedef struct FFStream {
uint8_t dts_ordered;
uint8_t dts_misordered;
#if FF_API_AVSTREAM_SIDE_DATA
/**
* Internal data to inject global side data
*/
int inject_global_side_data;
#endif
/**
* display aspect ratio (0 if unknown)