History

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.

Marth64 committed 2 years ago

Commit 6bbaa7d1 parent e1ace1d1 file · +2 −2Browse files

Unified · Split

libavformat/dvdvideodec.c+2−2
@@ -804,13 +804,13 @@ static int dvdvideo_play_next_ps_block(AVFormatContext *s, DVDVideoPlaybackState · 803 unmodified lines
804 return AVERROR_INPUT_CHANGED;804 return AVERROR_INPUT_CHANGED;
805 }805 }
806 806
807 memcpy(buf, &nav_buf, nav_len);
808
809 if (state->pgn != cur_pgn)807 if (state->pgn != cur_pgn)
810 av_log(s, AV_LOG_WARNING, "Unexpected PG change (expected=%d actual=%d); "808 av_log(s, AV_LOG_WARNING, "Unexpected PG change (expected=%d actual=%d); "
811 "this could be due to a missed NAV packet\n",809 "this could be due to a missed NAV packet\n",
812 state->pgn, cur_pgn);810 state->pgn, cur_pgn);
813 811
812 memcpy(buf, &nav_buf, nav_len);
813
814 (*p_nav_event) = nav_event;814 (*p_nav_event) = nav_event;
815 815
816 state->is_seeking = 0;816 state->is_seeking = 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t