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

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sun Aug 6 13:13:23 EEST 2023


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/amfenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
 
-- 
2.34.1



More information about the ffmpeg-devel mailing list