mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-16 03:50:05 +01:00
fftools/ffmpeg: factor out attaching FrameData to a frame
Will be useful in following commits.
This commit is contained in:
@@ -431,6 +431,17 @@ InputStream *ist_iter(InputStream *prev)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
FrameData *frame_data(AVFrame *frame)
|
||||
{
|
||||
if (!frame->opaque_ref) {
|
||||
frame->opaque_ref = av_buffer_allocz(sizeof(FrameData));
|
||||
if (!frame->opaque_ref)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return (FrameData*)frame->opaque_ref->data;
|
||||
}
|
||||
|
||||
void remove_avoptions(AVDictionary **a, AVDictionary *b)
|
||||
{
|
||||
const AVDictionaryEntry *t = NULL;
|
||||
|
||||
Reference in New Issue
Block a user