[FFmpeg-devel] [PATCH] avformat/avisynth: Don't insert null frames or samples at the start of a stream.

Stephen Hutchinson qyot27 at gmail.com
Wed Apr 10 21:44:15 CEST 2013


This is what I get for assuming something before actually testing it.

The patch does fix the issue of the demuxer inserting a null frame before
real video starts, but I was wrong about the framerate/SSRC thing: that may
have have been fixed by either the previous patch d s submitted toward
fixing ticket #2412, or by some other change in FFmpeg that I'm unaware
of.  Will that need a new patch with a different commit message to be
submitted, even though the patch itself won't change?


On Wed, Apr 10, 2013 at 3:29 PM, Stephen Hutchinson <qyot27 at gmail.com>wrote:

> This is the last remaining issue from ticket #2412, and also seems
> to resolve another issue relating to sluggish start performance for
> certain source filters when using a combination of certain fps
> rates and the SSRC filter. In FFMS2's case, it could actually
> cause ffmpeg.exe to hang and/or segfault.
> ---
>  libavformat/avisynth.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c
> index 775a5f2..a5a4fcc 100644
> --- a/libavformat/avisynth.c
> +++ b/libavformat/avisynth.c
> @@ -420,8 +420,8 @@ static int avisynth_read_packet_video(AVFormatContext
> *s, AVPacket *pkt, int dis
>      if (discard)
>          return 0;
>
> -    pkt->pts = avs->curr_frame;
> -    pkt->dts = avs->curr_frame;
> +    pkt->pts = n;
> +    pkt->dts = n;
>      pkt->duration = 1;
>
>      // Define the bpp values for the new AviSynth 2.6 colorspaces
> @@ -516,8 +516,8 @@ static int avisynth_read_packet_audio(AVFormatContext
> *s, AVPacket *pkt, int dis
>      if (discard)
>          return 0;
>
> -    pkt->pts = avs->curr_sample;
> -    pkt->dts = avs->curr_sample;
> +    pkt->pts = n;
> +    pkt->dts = n;
>      pkt->duration = samples;
>
>      pkt->size = avs_bytes_per_channel_sample(avs->vi) * samples *
> avs->vi->nchannels;
> --
> 1.7.10.4
>
>


More information about the ffmpeg-devel mailing list