diff mbox

[FFmpeg-devel] libavformat/dashdec: Add a re-entrance check point after an interrupt operation

Message ID BN6PR22MB03379AD0202EBCE799E20A37FE260@BN6PR22MB0337.namprd22.prod.outlook.com
State Accepted
Commit b205635fbc0893b092caabd9edc047d16e44da7e
Headers show

Commit Message

Colin NG Aug. 8, 2018, 6:09 p.m. UTC
---
 libavformat/dashdec.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Liu Steven Aug. 29, 2018, 8:38 a.m. UTC | #1
> 在 2018年8月9日,上午2:09,Colin NG <colin_ng@hotmail.com> 写道:
> 
> ---
> libavformat/dashdec.c | 6 ++++++
> 1 file changed, 6 insertions(+)
> 
> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
> index 5730252..310dc20 100644
> --- a/libavformat/dashdec.c
> +++ b/libavformat/dashdec.c
> @@ -1764,6 +1764,12 @@ static int reopen_demux_for_component(AVFormatContext *s, struct representation
>     if (pls->ctx) {
>         close_demux_for_component(pls);
>     }
> +
> +    if (ff_check_interrupt(&s->interrupt_callback)) {
> +        ret = AVERROR_EXIT;
> +        goto fail;
> +    }
> +
>     if (!(pls->ctx = avformat_alloc_context())) {
>         ret = AVERROR(ENOMEM);
>         goto fail;
> -- 
> 2.7.4
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

pushed


Thanks
diff mbox

Patch

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 5730252..310dc20 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1764,6 +1764,12 @@  static int reopen_demux_for_component(AVFormatContext *s, struct representation
     if (pls->ctx) {
         close_demux_for_component(pls);
     }
+
+    if (ff_check_interrupt(&s->interrupt_callback)) {
+        ret = AVERROR_EXIT;
+        goto fail;
+    }
+
     if (!(pls->ctx = avformat_alloc_context())) {
         ret = AVERROR(ENOMEM);
         goto fail;