segment: Pass the interrupt callback on to the chained AVFormatContext, too

Message ID 1349183393-76322-1-git-send-email-martin@martin.st
State Committed
Commit 4edb34f6cc43a64ea6582ebaf95a7e9e56cbb9af
Headers show

Commit Message

Martin Storsjö Oct. 2, 2012, 1:09 p.m.
This might not be needed at the moment, but it's good practice to
pass it to all chained AVFormatContexts, if it would happen to be
used there at a later point.
---
 libavformat/segment.c |    1 +
 1 file changed, 1 insertion(+)

Comments

Luca Barbato Oct. 2, 2012, 1:26 p.m. | #1
"Martin Storsjö" <martin@martin.st> wrote:

>This might not be needed at the moment, but it's good practice to
>pass it to all chained AVFormatContexts, if it would happen to be
>used there at a later point.
>---
> libavformat/segment.c |    1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/libavformat/segment.c b/libavformat/segment.c
>index 88d80a4..0c644d4 100644
>--- a/libavformat/segment.c
>+++ b/libavformat/segment.c
>@@ -144,6 +144,7 @@ static int seg_write_header(AVFormatContext *s)
>         goto fail;
>     }
> 
>+    oc->interrupt_callback = s->interrupt_callback;
>     seg->avf = oc;
> 
>     oc->streams = s->streams;

Looks fine.

Patch

diff --git a/libavformat/segment.c b/libavformat/segment.c
index 88d80a4..0c644d4 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -144,6 +144,7 @@  static int seg_write_header(AVFormatContext *s)
         goto fail;
     }
 
+    oc->interrupt_callback = s->interrupt_callback;
     seg->avf = oc;
 
     oc->streams = s->streams;