Browse Source

avienc: force a valid timebase for video

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 13 years ago
parent
commit
bacebe1f95
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      libavformat/avienc.c

+ 6
- 0
libavformat/avienc.c View File

@@ -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;


Loading…
Cancel
Save