aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-03-24 21:36:51 +0100
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-03-31 12:37:42 +0200
commit40393ac568db345b0388e1c99fc89f41a5b08037 (patch)
treee2f4211e0433600183baeffdcfc383a47684b47f
parent50059bde77674977d9134f3c1151a63cb7a2391c (diff)
downloadffmpeg-40393ac568db345b0388e1c99fc89f41a5b08037.tar.gz
movenc: add some default cases.
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@gmx.de>
-rw-r--r--libavformat/movenc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 7c1c559d7e..dd14a08907 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1316,6 +1316,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";
}
}
@@ -3207,6 +3211,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;