diff mbox series

[FFmpeg-devel,7/7] avcodec/amfenc: Fix declaration-after-statement warning

Message ID AS8P250MB074406D990674A6AA02190458F0FA@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit d9d56953906103dfae351e4d32af501fa1d62bdb
Headers show
Series [FFmpeg-devel,1/7] avutil/bprint: Don't use value of AV_BPRINT_SIZE_AUTOMATIC directly | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Aug. 6, 2023, 10:13 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/amfenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/amfenc.c b/libavcodec/amfenc.c
index cb48f8c273..518b8396e7 100644
--- a/libavcodec/amfenc.c
+++ b/libavcodec/amfenc.c
@@ -720,10 +720,10 @@  int ff_amf_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)
         if (!avpkt->data && !avpkt->buf) {
             res_query = ctx->encoder->pVtbl->QueryOutput(ctx->encoder, &data);
             if (data) {
-                query_output_data_flag = 1;
                 // copy data to packet
                 AMFBuffer *buffer;
                 AMFGuid guid = IID_AMFBuffer();
+                query_output_data_flag = 1;
                 data->pVtbl->QueryInterface(data, &guid, (void**)&buffer); // query for buffer interface
                 ret = amf_copy_buffer(avctx, avpkt, buffer);