Skip to content

Commit eba87be

Browse files
committed
recording: Prevents the compiler from optimizing logic errors caused by code.
(╯°口°)╯(┴┴ (cherry picked from commit 477c1ab)
1 parent 11c474c commit eba87be

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

ijkmedia/ijkplayer/ff_ffplay.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,11 +1715,10 @@ static int send_frame_to_java3(FFPlayer *ffp, Frame *vp, AVFrame *frame)
17151715
int line_width[] = {frame->width, frame->width / 2, frame->width / 2}; // for yuv420p
17161716
int line_height[] = {frame->height, frame->height / 2, frame->height / 2}; // for yuv420p
17171717
for (int i = 0; i < AV_NUM_DATA_POINTERS; i++) {
1718-
int size = frame->linesize[i] * line_height[i];
1719-
if (size <= 0) {
1718+
if (frame->linesize[i] <= 0) {
17201719
break;
17211720
}
1722-
total_size += size;
1721+
total_size += frame->linesize[i] * line_height[i];
17231722
planes++;
17241723
}
17251724
if (!is->pixel_buffer) {

0 commit comments

Comments
 (0)