aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-01 19:54:47 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-01 20:26:59 +0100
commitbacebe1f952d9192338a0682a0e48fbb4c88e450 (patch)
tree291871ad30c1d8b85b3558d018a3872366003f4c
parent7669144adae9766d3e01e0e66c434cc7e4db704b (diff)
downloadffmpeg-bacebe1f952d9192338a0682a0e48fbb4c88e450.tar.gz
avienc: force a valid timebase for video
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/avienc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index ce5f85d581..bd7bcef2c2 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -247,6 +247,12 @@ static int avi_write_header(AVFormatContext *s)
ff_parse_specific_params(stream, &au_byterate, &au_ssize, &au_scale);
+ if ( stream->codec_type == AVMEDIA_TYPE_VIDEO
+ && stream->codec_id != AV_CODEC_ID_XSUB
+ && au_byterate > 1000LL*au_scale) {
+ au_byterate = 600;
+ au_scale = 1;
+ }
avpriv_set_pts_info(s->streams[i], 64, au_scale, au_byterate);
if(stream->codec_id == AV_CODEC_ID_XSUB)
au_scale = au_byterate = 0;