diff mbox series

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

Message ID 20221113184441.1741-2-cus@passwd.hu
State Accepted
Commit bd5ea785567c60a8f58c472ada37115b680f8691
Headers show
Series [FFmpeg-devel,1/3] avformat/electronicarts: fix EOF check | 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

Marton Balint Nov. 13, 2022, 6:44 p.m. UTC
Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavformat/electronicarts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Peter Ross Nov. 17, 2022, 7:30 a.m. UTC | #1
On Sun, Nov 13, 2022 at 07:44:40PM +0100, Marton Balint wrote:
> Signed-off-by: Marton Balint <cus@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:

lgtm

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
diff mbox series

Patch

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: