Quoting Andreas Rheinhardt (2021-11-27 10:06:35) > Anton Khirnov: > > > > Not sure whether this was asked already - why do we need this new > > function? Seems to me you can accomplish the same thing by just adding > > the type field to AVFrame. Then > > - if type is AVMEDIA_TYPE_SUBTITLE -> allocate a subtitle > > - if type is AVMEDIA_TYPE_{VIDEO,AUDIO} -> allocate video/audio > > - otherwise detect video/audio as we do now > > > > https://ffmpeg.org/pipermail/ffmpeg-devel/2021-September/285185.html
So IIUC the only concern is that a user might "manually" unref the frame without calling av_frame_unref(). I would say that this is already illegal, because we can (and did) add new allocated objects to AVFrame that would break things if you just kept them from one frame to the other (especially of a different type), e.g. hw_frames_ctx. -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".