On Mon, 27 Feb 2012 14:12:52 -0500, Justin Ruggles <[email protected]> 
wrote:
> Fixes timestamp calculation.
> The FATE reference is updated because timestamp calculations are now more
> accurate. Previous timestamps were based on average bit rate.
> ---
>  libavformat/vqf.c        |    3 +++
>  tests/ref/fate/vqf-demux |    2 +-
>  2 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/libavformat/vqf.c b/libavformat/vqf.c
> index b9fa8be..0581b80 100644
> --- a/libavformat/vqf.c
> +++ b/libavformat/vqf.c
> @@ -30,6 +30,7 @@ typedef struct VqfContext {
>      int frame_bit_len;
>      uint8_t last_frame_bits;
>      int remaining_bits;
> +    int packet_duration;
>  } VqfContext;
>  
>  static int vqf_probe(AVProbeData *probe_packet)
> @@ -200,6 +201,7 @@ static int vqf_read_header(AVFormatContext *s)
>                 st->codec->sample_rate, st->codec->bit_rate);
>          return -1;
>      }
> +    c->packet_duration = size;
>      c->frame_bit_len = st->codec->bit_rate*size/st->codec->sample_rate;
>      avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
>  

If the packet duration is constant, why not factor it into timebase?

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to