fftools/ffmpeg_enc: simplify opaque_ref check

Found-while-revieweing: CID1520670 Dereference after null check

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 97b2ab15de964d9455aa902ab616881f76d2cb67)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-04-27 22:20:25 +02:00
parent 8941956c32
commit 43dfbdcae5
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -506,7 +506,7 @@ void enc_stats_write(OutputStream *ost, EncStats *es,
const FrameData *fd; const FrameData *fd;
if ((frame && frame->opaque_ref) || (pkt && pkt->opaque_ref)) { if (frame ? frame->opaque_ref : pkt->opaque_ref) {
fd = (const FrameData*)(frame ? frame->opaque_ref->data : pkt->opaque_ref->data); fd = (const FrameData*)(frame ? frame->opaque_ref->data : pkt->opaque_ref->data);
tbi = fd->dec.tb; tbi = fd->dec.tb;
ptsi = fd->dec.pts; ptsi = fd->dec.pts;