Unified · Split
| @@ -2339,7 +2339,7 @@ static void stream_component_close(VideoState *is, int stream_index) · 2338 unmodified lines | |||
| 2339 | variable instead of a thread local variable */ | 2339 | variable instead of a thread local variable */ |
| 2340 | static VideoState *global_video_state; | 2340 | static VideoState *global_video_state; |
| 2341 | 2341 | ||
| 2342 | static int decode_interrupt_cb(void) | 2342 | static int decode_interrupt_cb(void *ctx) |
| 2343 | { | 2343 | { |
| 2344 | return (global_video_state && global_video_state->abort_request); | 2344 | return (global_video_state && global_video_state->abort_request); |
| 2345 | } | 2345 | } |
| @@ -2364,8 +2364,9 @@ static int decode_thread(void *arg) · 18 unmodified lines | |||
| 2364 | is->subtitle_stream = -1; | 2364 | is->subtitle_stream = -1; |
| 2365 | 2365 | ||
| 2366 | global_video_state = is; | 2366 | global_video_state = is; |
| 2367 | avio_set_interrupt_cb(decode_interrupt_cb); | ||
| 2368 | 2367 | ||
| 2368 | ic = avformat_alloc_context(); | ||
| 2369 | ic->interrupt_callback.callback = decode_interrupt_cb; | ||
| 2369 | err = avformat_open_input(&ic, is->filename, is->iformat, &format_opts); | 2370 | err = avformat_open_input(&ic, is->filename, is->iformat, &format_opts); |
| 2370 | if (err < 0) { | 2371 | if (err < 0) { |
| 2371 | print_error(is->filename, err); | 2372 | print_error(is->filename, err); |