aboutsummaryrefslogtreecommitdiffstats
path: root/avplay.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-11-06 23:28:49 +0200
committerAnton Khirnov <anton@khirnov.net>2011-11-18 11:01:16 +0100
commit40972f7c54e013d2da8bf42cb34ab25cfea75eab (patch)
tree3a8d8ff18fd08796f51b759591cd0328558d594e /avplay.c
parent2abe947ac0be328a1d9f47562afffdcba055bc74 (diff)
downloadffmpeg-40972f7c54e013d2da8bf42cb34ab25cfea75eab.tar.gz
avplay: Set the new interrupt callback
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'avplay.c')
-rw-r--r--avplay.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/avplay.c b/avplay.c
index 01c0f118e9..556c463aec 100644
--- a/avplay.c
+++ b/avplay.c
@@ -2339,7 +2339,7 @@ static void stream_component_close(VideoState *is, int stream_index)
variable instead of a thread local variable */
static VideoState *global_video_state;
-static int decode_interrupt_cb(void)
+static int decode_interrupt_cb(void *ctx)
{
return (global_video_state && global_video_state->abort_request);
}
@@ -2364,8 +2364,9 @@ static int decode_thread(void *arg)
is->subtitle_stream = -1;
global_video_state = is;
- avio_set_interrupt_cb(decode_interrupt_cb);
+ ic = avformat_alloc_context();
+ ic->interrupt_callback.callback = decode_interrupt_cb;
err = avformat_open_input(&ic, is->filename, is->iformat, &format_opts);
if (err < 0) {
print_error(is->filename, err);