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
534534 ff_thread_await_progress((AVFrame *) s->last_picture_ptr,
535535 mb_y, 0);
536536 }
537+ if (!s->last_picture.motion_val[0] ||
538+ !s->last_picture.ref_index[0])
539+ goto skip_last_mv;
537540 prev_x = s->last_picture.motion_val[0][mot_index][0];
538541 prev_y = s->last_picture.motion_val[0][mot_index][1];
539542 prev_ref = s->last_picture.ref_index[0][4*mb_xy];
@@ -548,6 +551,7 @@ skip_mean_and_median: · 8 unmodified lines
548551 mv_predictor[pred_count][1]= prev_y;
549552 ref [pred_count] = prev_ref;
550553 pred_count++;
554+ skip_last_mv:
551555
552556 s->mv_dir = MV_DIR_FORWARD;
553557 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