[FFmpeg-devel] [PATCH] movenc: add some default cases.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sat Mar 24 21:38:08 CET 2012
This fixes crashes when copying a data track as in trac
issue #236.
No proper timecode tracks will be written though.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
libavformat/movenc.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 0b4ccbf..69f83fa 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1317,6 +1317,10 @@ static int mov_write_hdlr_tag(AVIOContext *pb, MOVTrack *track)
} else if (track->enc->codec_tag == MKTAG('r','t','p',' ')) {
hdlr_type = "hint";
descr = "HintHandler";
+ } else {
+ hdlr = "dhlr";
+ hdlr_type = "url ";
+ descr = "DataHandler";
}
}
@@ -3225,6 +3229,8 @@ 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->height)
track->height = st->codec->height;
--
1.7.9.1
More information about the ffmpeg-devel
mailing list