[FFmpeg-devel] [PATCH] avcodec/libx265: add support for reordered_opaque

James Almer jamrial at gmail.com
Wed May 20 00:56:05 EEST 2020


On 5/19/2020 5:53 PM, Hendrik Leppkes wrote:
> On Tue, May 19, 2020 at 10:45 PM Derek Buitenhuis
> <derek.buitenhuis at gmail.com> wrote:
>>
>> On 19/05/2020 19:55, James Almer wrote:
>>> +        if (pic->reordered_opaque) {
>>
>> If this is meant to be PTS, won't this break on PTS==0?
>>
> 
> Well, it won't break anything, since if  its not set on the frame,
> it'll be set to zero when the frame returns
> 
> However, the default value of reordered_opaque is AV_NOPTS_VALUE, so
> if you want to skip writing one value, it should probably be that one,
> instead of zero.

No, the AVCodecContext field and the AVFrame field have different
default values. By writing 0 in AVCodecContext in this scenario I'm
effectively passing the AVFrame value through, which is the expected
behavior for AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE encoders as per the doxy.


More information about the ffmpeg-devel mailing list