diff mbox

[FFmpeg-devel] lavf/aviobuf.c: Adapt avio_accept and avio_handshake to new AVIOContext API

Message ID 1475263074-1089-1-git-send-email-klaxa1337@googlemail.com
State Accepted
Commit d0be0cbebc207f3a39da2a668f45be413c9152c4
Headers show

Commit Message

Stephan Holljes Sept. 30, 2016, 7:17 p.m. UTC
Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
---
 libavformat/aviobuf.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

This fixes doc/examples/http_multiclient.c from segfaulting. Seems like these functions
were forgotten during the white- and blacklisting update.

Comments

Clément Bœsch Oct. 3, 2016, 9:48 p.m. UTC | #1
On Fri, Sep 30, 2016 at 09:17:54PM +0200, Stephan Holljes wrote:
> Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
> ---
>  libavformat/aviobuf.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> This fixes doc/examples/http_multiclient.c from segfaulting. Seems like these functions
> were forgotten during the white- and blacklisting update.
> 
> diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
> index f3acb32..134d627 100644
> --- a/libavformat/aviobuf.c
> +++ b/libavformat/aviobuf.c
> @@ -1156,7 +1156,8 @@ int avio_read_to_bprint(AVIOContext *h, AVBPrint *pb, size_t max_size)
>  int avio_accept(AVIOContext *s, AVIOContext **c)
>  {
>      int ret;
> -    URLContext *sc = s->opaque;
> +    AVIOInternal *internal = s->opaque;
> +    URLContext *sc = internal->h;
>      URLContext *cc = NULL;
>      ret = ffurl_accept(sc, &cc);
>      if (ret < 0)
> @@ -1166,7 +1167,8 @@ int avio_accept(AVIOContext *s, AVIOContext **c)
>  
>  int avio_handshake(AVIOContext *c)
>  {
> -    URLContext *cc = c->opaque;
> +    AVIOInternal *internal = c->opaque;
> +    URLContext *cc = internal->h;
>      return ffurl_handshake(cc);
>  }

applied, thanks
diff mbox

Patch

diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index f3acb32..134d627 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -1156,7 +1156,8 @@  int avio_read_to_bprint(AVIOContext *h, AVBPrint *pb, size_t max_size)
 int avio_accept(AVIOContext *s, AVIOContext **c)
 {
     int ret;
-    URLContext *sc = s->opaque;
+    AVIOInternal *internal = s->opaque;
+    URLContext *sc = internal->h;
     URLContext *cc = NULL;
     ret = ffurl_accept(sc, &cc);
     if (ret < 0)
@@ -1166,7 +1167,8 @@  int avio_accept(AVIOContext *s, AVIOContext **c)
 
 int avio_handshake(AVIOContext *c)
 {
-    URLContext *cc = c->opaque;
+    AVIOInternal *internal = c->opaque;
+    URLContext *cc = internal->h;
     return ffurl_handshake(cc);
 }