Readability improvement; the warning can be bundled beneath the preceding validations rather than awkwardly between the memcpy and return.
Unified · Split
| @@ -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; |