MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / wrapped_avframe_decode

Function wrapped_avframe_decode

libavcodec/wrapped_avframe.c:78–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78static int wrapped_avframe_decode(AVCodecContext *avctx, AVFrame *out,
79 int *got_frame, AVPacket *pkt)
80{
81 AVFrame *in;
82 int err;
83
84 if (!(pkt->flags & AV_PKT_FLAG_TRUSTED)) {
85 // This decoder is not usable with untrusted input.
86 return AVERROR(EPERM);
87 }
88
89 if (pkt->size < sizeof(AVFrame))
90 return AVERROR(EINVAL);
91
92 in = (AVFrame*)pkt->data;
93
94 err = av_frame_ref(out, in);
95 if (err < 0)
96 return err;
97
98 err = ff_decode_frame_props(avctx, out);
99 if (err < 0)
100 return err;
101
102 *got_frame = 1;
103 return 0;
104}
105
106const FFCodec ff_wrapped_avframe_encoder = {
107 .p.name = "wrapped_avframe",

Callers

nothing calls this directly

Calls 2

av_frame_refFunction · 0.85
ff_decode_frame_propsFunction · 0.85

Tested by

no test coverage detected