diff mbox

[FFmpeg-devel] avformat/mux: be less strict with bitstream filter failures

Message ID 20171031180057.6396-1-jamrial@gmail.com
State Accepted
Commit e70cdf91a7bc997f2b6e917f2ee4bfdc25d31684
Headers show

Commit Message

James Almer Oct. 31, 2017, 6 p.m. UTC
This makes the autobsf feature behave the same as the manual
bitstream filtering in ffmpeg.c

Fixes ticket #6794

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/mux.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Carl Eugen Hoyos Nov. 1, 2017, 12:50 a.m. UTC | #1
2017-10-31 19:00 GMT+01:00 James Almer <jamrial@gmail.com>:
> This makes the autobsf feature behave the same as the manual
> bitstream filtering in ffmpeg.c
>
> Fixes ticket #6794
>
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  libavformat/mux.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/libavformat/mux.c b/libavformat/mux.c
> index 77e03ee5ba..1445e7dcd6 100644
> --- a/libavformat/mux.c
> +++ b/libavformat/mux.c
> @@ -876,7 +876,9 @@ static int do_packet_auto_bsf(AVFormatContext *s, AVPacket *pkt) {
>              av_log(ctx, AV_LOG_ERROR,
>                      "Failed to send packet to filter %s for stream %d\n",
>                      ctx->filter->name, pkt->stream_index);
> -            return ret;
> +            if (s->error_recognition & AV_EF_EXPLODE)
> +                return ret;
> +            return 0;

Looks like a good idea to me.

Thank you, Carl Eugen
James Almer Nov. 1, 2017, 2:57 p.m. UTC | #2
On 10/31/2017 9:50 PM, Carl Eugen Hoyos wrote:
> 2017-10-31 19:00 GMT+01:00 James Almer <jamrial@gmail.com>:
>> This makes the autobsf feature behave the same as the manual
>> bitstream filtering in ffmpeg.c
>>
>> Fixes ticket #6794
>>
>> Signed-off-by: James Almer <jamrial@gmail.com>
>> ---
>>  libavformat/mux.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavformat/mux.c b/libavformat/mux.c
>> index 77e03ee5ba..1445e7dcd6 100644
>> --- a/libavformat/mux.c
>> +++ b/libavformat/mux.c
>> @@ -876,7 +876,9 @@ static int do_packet_auto_bsf(AVFormatContext *s, AVPacket *pkt) {
>>              av_log(ctx, AV_LOG_ERROR,
>>                      "Failed to send packet to filter %s for stream %d\n",
>>                      ctx->filter->name, pkt->stream_index);
>> -            return ret;
>> +            if (s->error_recognition & AV_EF_EXPLODE)
>> +                return ret;
>> +            return 0;
> 
> Looks like a good idea to me.
> 
> Thank you, Carl Eugen

Pushed, thanks.
diff mbox

Patch

diff --git a/libavformat/mux.c b/libavformat/mux.c
index 77e03ee5ba..1445e7dcd6 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -876,7 +876,9 @@  static int do_packet_auto_bsf(AVFormatContext *s, AVPacket *pkt) {
             av_log(ctx, AV_LOG_ERROR,
                     "Failed to send packet to filter %s for stream %d\n",
                     ctx->filter->name, pkt->stream_index);
-            return ret;
+            if (s->error_recognition & AV_EF_EXPLODE)
+                return ret;
+            return 0;
         }
     }
     return 1;