History

error_resilience: skip last-MV predictor step if MVs are not available.

Fixes crashes when playing broken MPEG2-TS streams.

Ronald Bultje committed 15 years ago

Commit 20153fb1 parent d42aaa81 file · +4 −0Browse files

Unified · Split

libavcodec/error_resilience.c+4−0
@@ -534,6 +534,9 @@ skip_mean_and_median: · 533 unmodified lines
534 ff_thread_await_progress((AVFrame *) s->last_picture_ptr,534 ff_thread_await_progress((AVFrame *) s->last_picture_ptr,
535 mb_y, 0);535 mb_y, 0);
536 }536 }
537 if (!s->last_picture.motion_val[0] ||
538 !s->last_picture.ref_index[0])
539 goto skip_last_mv;
537 prev_x = s->last_picture.motion_val[0][mot_index][0];540 prev_x = s->last_picture.motion_val[0][mot_index][0];
538 prev_y = s->last_picture.motion_val[0][mot_index][1];541 prev_y = s->last_picture.motion_val[0][mot_index][1];
539 prev_ref = s->last_picture.ref_index[0][4*mb_xy];542 prev_ref = s->last_picture.ref_index[0][4*mb_xy];
@@ -548,6 +551,7 @@ skip_mean_and_median: · 8 unmodified lines
548 mv_predictor[pred_count][1]= prev_y;551 mv_predictor[pred_count][1]= prev_y;
549 ref [pred_count] = prev_ref;552 ref [pred_count] = prev_ref;
550 pred_count++;553 pred_count++;
554 skip_last_mv:
551 555
552 s->mv_dir = MV_DIR_FORWARD;556 s->mv_dir = MV_DIR_FORWARD;
553 s->mb_intra=0;557 s->mb_intra=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