[FFmpeg-devel] [PATCH] make DV muxer not forget about audio remaining in buffer

Roman Shaposhnik rvs
Tue May 15 08:02:04 CEST 2007


On Sat, 2007-05-12 at 15:45 -0700, Corey Hickey wrote:
> Is this the right approach? Can I apply the patch? ...or is it a
> horrible hack?

  This looks reasonable. I'd say -- go ahead and apply it.

Thanks,
Roman.

P.S. And yes, some of us do have weekends. At least twice a year :-) 
 
> 
> Thanks,
> Corey
> plain text document attachment (dv_audio.diff)
> Index: libavformat/dvenc.c
> ===================================================================
> --- libavformat/dvenc.c	(revision 9006)
> +++ libavformat/dvenc.c	(working copy)
> @@ -266,13 +266,15 @@
>      /* Lets see if we have enough data to construct one DV frame */
>      if (c->has_video == 1 && c->has_audio + 1 == 1<<c->n_ast) {
>          dv_inject_metadata(c, *frame);
> +        c->has_audio = 0;
>          for (i=0; i<c->n_ast; i++) {
>               dv_inject_audio(c, i, *frame);
>               av_fifo_drain(&c->audio_data[i], reqasize);
> +             c->has_audio |= ((reqasize <= av_fifo_size(&c->audio_data[i])) << i);
>          }
>  
>          c->has_video = 0;
> -        c->has_audio = 0;
> +
>          c->frames++;
>  
>          return c->sys->frame_size;
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel





More information about the ffmpeg-devel mailing list