[FFmpeg-devel] [PATCH 2/3] avformat/electronicarts: set packet_read in one place

Marton Balint cus at passwd.hu
Sun Nov 13 20:44:40 EET 2022


Signed-off-by: Marton Balint <cus at passwd.hu>
---
 libavformat/electronicarts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 0a0d6249e8..0532264f38 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -726,8 +726,9 @@ get_video_packet:
                 ret = av_append_packet(pb, pkt, chunk_size);
             } else
                 ret = av_get_packet(pb, pkt, chunk_size);
+            packet_read = 1;
+
             if (ret < 0) {
-                packet_read = 1;
                 partial_packet = 0;
                 break;
             }
@@ -737,7 +738,6 @@ get_video_packet:
             else
                 pkt->stream_index = ea->video.stream_index;
             pkt->flags       |= key;
-            packet_read       = 1;
             break;
 
         default:
-- 
2.35.3



More information about the ffmpeg-devel mailing list