Project

General

Profile

Bug #2708 ยป 0001-transcoding-fix-compile-error-when-using-libav-fixes.patch

S. Benz, 2015-03-10 09:40

View differences:

src/plumbing/transcoding.c
1032 1032
    // Encoder uses "time_base" for bitrate calculation, but "time_base" from decoder
1033 1033
    // will be deprecated in the future, therefore calculate "time_base" from "framerate" if available.
1034 1034
    octx->ticks_per_frame = ictx->ticks_per_frame;
1035
    if (ictx->framerate.num != 0 && ictx->framerate.den != 0) {
1036
      octx->time_base     = av_inv_q(av_mul_q(ictx->framerate, av_make_q(ictx->ticks_per_frame, 1)));
1037
    } else {
1038
      octx->time_base     = ictx->time_base;
1039
    }
1035
#if LIBAVCODEC_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56, 13, 100) // ffmpeg 2.5
1036
    octx->time_base       = av_inv_q(av_mul_q(ictx->framerate, av_make_q(ictx->ticks_per_frame, 1)));
1037
#else
1038
    octx->time_base       = ictx->time_base;
1039
#endif
1040 1040

  
1041 1041
    switch (ts->ts_type) {
1042 1042
    case SCT_MPEG2VIDEO:
1043
- 
    (1-1/1)