On Thu, 2012-10-11 at 21:52 -0700, Alex Converse wrote:
> Some files in the wild have time code tracks with very negative initial
> offsets.
> ---
>  libavformat/mov.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index 63049f5..2a41dd5 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -1790,7 +1790,7 @@ static void mov_build_index(MOVContext *mov, AVStream 
> *st)
>      AVIndexEntry *mem;
>  
>      /* adjust first dts according to edit list */
> -    if (sc->time_offset && mov->time_scale > 0) {
> +    if (sc->time_offset && mov->time_scale > 0 && st->codec->codec_type != 
> AVMEDIA_TYPE_DATA) {
>          if (sc->time_offset < 0)
>              sc->time_offset = av_rescale(sc->time_offset, sc->time_scale, 
> mov->time_scale);
>          current_dts = -sc->time_offset;

Actually, the muxer should do no such shifting at all. Let an upper
layer take care of cutting the essence according to the EDL when
transcoding (if desired).

/Tomas

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to