summaryrefslogtreecommitdiff
path: root/libavformat/swfenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-18 18:18:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-18 19:49:17 +0200
commitac293b66851f6c4461eab03ca91af59d5ee4e02e (patch)
tree4bcf9e474aaec1e346c368660b52e4630059e380 /libavformat/swfenc.c
parent88514378bac99872265dad28072fb30160b26bfa (diff)
parent194be1f43ea391eb986732707435176e579265aa (diff)
Merge commit '194be1f43ea391eb986732707435176e579265aa'
* commit '194be1f43ea391eb986732707435176e579265aa': lavf: switch to AVStream.time_base as the hint for the muxer timebase Conflicts: doc/APIchanges libavformat/filmstripenc.c libavformat/movenc.c libavformat/mxfenc.c libavformat/oggenc.c libavformat/swf.h libavformat/version.h tests/ref/lavf/mkv Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/swfenc.c')
-rw-r--r--libavformat/swfenc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c
index 402f21ef40..3b6f9b3f83 100644
--- a/libavformat/swfenc.c
+++ b/libavformat/swfenc.c
@@ -212,6 +212,7 @@ static int swf_write_header(AVFormatContext *s)
if (enc->codec_id == AV_CODEC_ID_VP6F ||
enc->codec_id == AV_CODEC_ID_FLV1 ||
enc->codec_id == AV_CODEC_ID_MJPEG) {
+ swf->video_st = s->streams[i];
swf->video_enc = enc;
} else {
av_log(s, AV_LOG_ERROR, "SWF muxer only supports VP6, FLV1 and MJPEG\n");
@@ -229,8 +230,9 @@ static int swf_write_header(AVFormatContext *s)
} else {
width = swf->video_enc->width;
height = swf->video_enc->height;
- rate = swf->video_enc->time_base.den;
- rate_base = swf->video_enc->time_base.num;
+ // TODO: should be avg_frame_rate
+ rate = swf->video_st->time_base.den;
+ rate_base = swf->video_st->time_base.num;
}
if (!swf->audio_enc)