diff mbox

[FFmpeg-devel] ffmpeg: Fix bsf corrupting merged side data

Message ID 20161103135556.21946-1-michael@niedermayer.cc
State Accepted
Commit 11f24e71ff2b598d973fd24bcf950eebaea9b3e6
Headers show

Commit Message

Michael Niedermayer Nov. 3, 2016, 1:55 p.m. UTC
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 ffmpeg.c | 1 +
 1 file changed, 1 insertion(+)

Comments

James Almer Nov. 3, 2016, 2:17 p.m. UTC | #1
On 11/3/2016 10:55 AM, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  ffmpeg.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 3b91710..6b7ce72 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -789,6 +789,7 @@ static void output_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost)
>      if (ost->nb_bitstream_filters) {
>          int idx;
>  
> +        av_packet_split_side_data(pkt);
>          ret = av_bsf_send_packet(ost->bsf_ctx[0], pkt);
>          if (ret < 0)
>              goto finish;
> 

Is there a testcase this fixes that can be turned into a FATE test?
Michael Niedermayer Nov. 3, 2016, 3:08 p.m. UTC | #2
On Thu, Nov 03, 2016 at 11:17:05AM -0300, James Almer wrote:
> On 11/3/2016 10:55 AM, Michael Niedermayer wrote:
> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > ---
> >  ffmpeg.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/ffmpeg.c b/ffmpeg.c
> > index 3b91710..6b7ce72 100644
> > --- a/ffmpeg.c
> > +++ b/ffmpeg.c
> > @@ -789,6 +789,7 @@ static void output_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost)
> >      if (ost->nb_bitstream_filters) {
> >          int idx;
> >  
> > +        av_packet_split_side_data(pkt);
> >          ret = av_bsf_send_packet(ost->bsf_ctx[0], pkt);
> >          if (ret < 0)
> >              goto finish;
> > 
> 
> Is there a testcase this fixes that can be turned into a FATE test?

I had a rtmp stream someone setup for debuging this that failed with
stream copy but storing it to disk didnt result in a reproduceable
testcase

[...]
Michael Niedermayer Nov. 3, 2016, 11:44 p.m. UTC | #3
On Thu, Nov 03, 2016 at 02:55:56PM +0100, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  ffmpeg.c | 1 +
>  1 file changed, 1 insertion(+)

applied

[...]
wm4 Nov. 10, 2016, 11:39 a.m. UTC | #4
On Thu,  3 Nov 2016 14:55:56 +0100
Michael Niedermayer <michael@niedermayer.cc> wrote:

> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  ffmpeg.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 3b91710..6b7ce72 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -789,6 +789,7 @@ static void output_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost)
>      if (ost->nb_bitstream_filters) {
>          int idx;
>  
> +        av_packet_split_side_data(pkt);
>          ret = av_bsf_send_packet(ost->bsf_ctx[0], pkt);
>          if (ret < 0)
>              goto finish;

Can we finally get rid of this shitty merge side data hack?
diff mbox

Patch

diff --git a/ffmpeg.c b/ffmpeg.c
index 3b91710..6b7ce72 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -789,6 +789,7 @@  static void output_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost)
     if (ost->nb_bitstream_filters) {
         int idx;
 
+        av_packet_split_side_data(pkt);
         ret = av_bsf_send_packet(ost->bsf_ctx[0], pkt);
         if (ret < 0)
             goto finish;