History

avplay: Set the new interrupt callback

Martin Storsjö committed 15 years ago

Commit 40972f71 parent 2abe9471 file · +3 −2Browse files

Unified · Split

avplay.c+3−2
@@ -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 */
2340static VideoState *global_video_state;2340static VideoState *global_video_state;
2341 2341
2342static int decode_interrupt_cb(void)2342static 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);

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