[FFmpeg-devel] [PATCH 1/4] movenc: set timescale for timecode tracks

Clément Bœsch ubitux at gmail.com
Sat Aug 25 17:15:27 CEST 2012


On Sat, Aug 25, 2012 at 11:44:11AM +0200, Jean First wrote:
> fix ticket #236
> 

Partially? (the crash?)

> Signed-off-by: Jean First <jeanfirst at gmail.com>
> ---
>  libavformat/movenc.c |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> index 695bd43..1cb1853 100644
> --- a/libavformat/movenc.c
> +++ b/libavformat/movenc.c
> @@ -3489,7 +3489,11 @@ static int mov_write_header(AVFormatContext *s)
>          }else if(st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE){
>              track->timescale = st->codec->time_base.den;
>          }else{
> -            track->timescale = MOV_TIMESCALE;
> +            if (track->enc->codec_tag == MKTAG('t','m','c','d')){
> +                track->timescale = st->codec->time_base.den;
> +            }else{
> +                track->timescale = MOV_TIMESCALE;
> +            }

Looks OK.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120825/5f7da2fb/attachment.asc>


More information about the ffmpeg-devel mailing list