avplay: Don't call avio_set_interrupt_cb(NULL)

Message ID 1325627930-21543-1-git-send-email-martin@martin.st
State Committed
Commit 0749720b6cdce68e4908dc59f1b4e1399852372b
Headers show

Commit Message

Martin Storsjö Jan. 3, 2012, 9:58 p.m.
Since we don't use avio_set_interrupt_cb for interrupt callbacks,
we don't need to call it to reset the interrupt cb either.

This avoids a warning about use of deprecated functions.
---
 avplay.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Comments

Ronald Bultje Jan. 4, 2012, 3:47 a.m. | #1
Hi,

On Tue, Jan 3, 2012 at 1:58 PM, Martin Storsjö <martin@martin.st> wrote:
> Since we don't use avio_set_interrupt_cb for interrupt callbacks,
> we don't need to call it to reset the interrupt cb either.
>
> This avoids a warning about use of deprecated functions.
> ---
>  avplay.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/avplay.c b/avplay.c
> index 6dbf140..3bbb7ef 100644
> --- a/avplay.c
> +++ b/avplay.c
> @@ -2599,7 +2599,6 @@ static int decode_thread(void *arg)
>     if (is->ic) {
>         avformat_close_input(&is->ic);
>     }
> -    avio_set_interrupt_cb(NULL);

I'm a little confused as for why it's there if it does nothing, but
sure, patch OK.

Ronald
Martin Storsjö Jan. 4, 2012, 9:05 a.m. | #2
On Tue, 3 Jan 2012, Ronald S. Bultje wrote:

> Hi,
>
> On Tue, Jan 3, 2012 at 1:58 PM, Martin Storsjö <martin@martin.st> wrote:
>> Since we don't use avio_set_interrupt_cb for interrupt callbacks,
>> we don't need to call it to reset the interrupt cb either.
>>
>> This avoids a warning about use of deprecated functions.
>> ---
>>  avplay.c |    1 -
>>  1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --git a/avplay.c b/avplay.c
>> index 6dbf140..3bbb7ef 100644
>> --- a/avplay.c
>> +++ b/avplay.c
>> @@ -2599,7 +2599,6 @@ static int decode_thread(void *arg)
>>     if (is->ic) {
>>         avformat_close_input(&is->ic);
>>     }
>> -    avio_set_interrupt_cb(NULL);
>
> I'm a little confused as for why it's there if it does nothing, but
> sure, patch OK.

It's just left over from an earlier change when we switched to the new 
interrupt API, patch pushed.

// Martin

Patch

diff --git a/avplay.c b/avplay.c
index 6dbf140..3bbb7ef 100644
--- a/avplay.c
+++ b/avplay.c
@@ -2599,7 +2599,6 @@  static int decode_thread(void *arg)
     if (is->ic) {
         avformat_close_input(&is->ic);
     }
-    avio_set_interrupt_cb(NULL);
 
     if (ret != 0) {
         SDL_Event event;