mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
video: properly pass through ICC data
The same should happen with any other side data that matters to mpv,
otherwise filters will drop it.
(No, don't try to argue that mpv should use AVFrame. That won't work.)
ffmpeg_garbage() is copy&paste from frame_new_side_data() in FFmpeg
(roughly feed201849b8f91), because it's not public API. The name
reflects my opinion about FFmpeg's API.
In mp_image_to_av_frame(), change the too-fragile
*new_ref = (struct mp_image){0};
into explicitly zeroing out the fields that are "transferred" to the
created AVFrame.
This commit is contained in:
@@ -46,5 +46,8 @@ const char *mp_codec_from_av_codec_id(int codec_id);
|
||||
void mp_set_avdict(struct AVDictionary **dict, char **kv);
|
||||
void mp_avdict_print_unset(struct mp_log *log, int msgl, struct AVDictionary *d);
|
||||
int mp_set_avopts(struct mp_log *log, void *avobj, char **kv);
|
||||
AVFrameSideData *ffmpeg_garbage(AVFrame *frame,
|
||||
enum AVFrameSideDataType type,
|
||||
AVBufferRef *buf);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user