diff mbox series

[FFmpeg-devel,v3,05/17] avformat/dvdvideodec: move memcpy below missed NAV packet warning

Message ID 20241007230505.27623-6-marth64@proxyid.net
State New
Headers show
Series avformat/dvdvideodec: bugfixes and menu chapter markers | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 fail Make failed

Commit Message

Marth64 Oct. 7, 2024, 11:04 p.m. UTC
Readability improvement; the warning can be bundled beneath
the preceding validations rather than awkwardly between the memcpy
and return.

Signed-off-by: Marth64 <marth64@proxyid.net>
---
 libavformat/dvdvideodec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/dvdvideodec.c b/libavformat/dvdvideodec.c
index bed7c38ff6..9246ac0863 100644
--- a/libavformat/dvdvideodec.c
+++ b/libavformat/dvdvideodec.c
@@ -804,13 +804,13 @@  static int dvdvideo_play_next_ps_block(AVFormatContext *s, DVDVideoPlaybackState
                     return AVERROR_INPUT_CHANGED;
                 }
 
-                memcpy(buf, &nav_buf, nav_len);
-
                 if (state->pgn != cur_pgn)
                     av_log(s, AV_LOG_WARNING, "Unexpected PG change (expected=%d actual=%d); "
                                               "this could be due to a missed NAV packet\n",
                                               state->pgn, cur_pgn);
 
+                memcpy(buf, &nav_buf, nav_len);
+
                 (*p_nav_event) = nav_event;
 
                 state->is_seeking = 0;