aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarth64 <marth64@proxyid.net>2024-10-07 18:04:53 -0500
committerMarth64 <marth64@proxyid.net>2024-11-16 14:40:51 -0600
commit6bbaa7db49de86653bd23544e5bb55315265f828 (patch)
tree242f67c009c2f24fc711071355a5a5558a74802a
parente1ace1d3146744439a8c7768813c8008de1e9ec6 (diff)
downloadffmpeg-6bbaa7db49de86653bd23544e5bb55315265f828.tar.gz
avformat/dvdvideodec: move memcpy below missed NAV packet warning
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>
-rw-r--r--libavformat/dvdvideodec.c4
1 files changed, 2 insertions, 2 deletions
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;