History

lavc: deprecate the use of AVCodecContext.time_base for decoding

When decoding, this field holds the inverse of the framerate that can be written in the headers for some codecs. Using a field called 'time_base' for this is very misleading, as there are no timestamps associated with it. Furthermore, this field is used for a very different purpose during encoding. Add a new field, called 'framerate', to replace the use of time_base for decoding.

Anton Khirnov committed 12 years ago

Commit 7ea1b341 parent d565fef27 files · +81 −54Browse files

Unified · Split

27 files
  1. doc/APIchanges +4 −0
  2. libavcodec/avcodec.h +10 −1
  3. libavcodec/cavsdec.c +1 −2
  4. libavcodec/dirac.c +1 −2
  5. libavcodec/dvdec.c +1 −1
  6. libavcodec/eacmv.c +1 −1
  7. libavcodec/eamad.c +1 −1
  8. libavcodec/eatgq.c +1 −1
  9. libavcodec/eatgv.c +1 −1
  10. libavcodec/eatqi.c +1 −1
  11. libavcodec/h261dec.c +1 −1
  12. libavcodec/h264.c +1 −1
  13. libavcodec/h264_slice.c +1 −1
  14. libavcodec/hevc.c +1 −1
  15. libavcodec/ituh263dec.c +10 −10
  16. libavcodec/libschroedingerdec.c +2 −2
  17. libavcodec/mpeg12dec.c +3 −4
  18. libavcodec/mpeg4videodec.c +9 −10
  19. libavcodec/mpegvideo_parser.c +7 −4
  20. libavcodec/options.c +1 −0
  21. libavcodec/pthread_frame.c +1 −0
  22. libavcodec/utils.c +10 −0
  23. libavcodec/vaapi_mpeg4.c +1 −1
  24. libavcodec/vc1.c +5 −5
  25. libavcodec/vdpau_mpeg4.c +1 −1
  26. libavcodec/version.h +4 −1
  27. libavcodec/vp3.c +1 −1
doc/APIchanges+4−0
@@ -13,6 +13,10 @@ libavutil: 2014-08-09 · 12 unmodified lines
1313
1414 API changes, most recent first:
1515
16+2014-10-xx - xxxxxxx - lavc 56.5.0 - avcodec.h
17+ Replace AVCodecContext.time_base used for decoding
18+ with AVCodecContext.framerate.
19+
1620 2014-10-xx - xxxxxxx - lavc 56.4.0 - avcodec.h
1721 Add AV_HWACCEL_FLAG_IGNORE_LEVEL flag to av_vdpau_bind_context().
1822
libavcodec/avcodec.h+10−1
@@ -1170,7 +1170,8 @@ typedef struct AVCodecContext { · 1169 unmodified lines
11701170 * timebase should be 1/framerate and timestamp increments should be
11711171 * identically 1.
11721172 * - encoding: MUST be set by user.
1173− * - decoding: Set by libavcodec.
1173+ * - decoding: the use of this field for decoding is deprecated.
1174+ * Use framerate instead.
11741175 */
11751176 AVRational time_base;
11761177
@@ -2788,6 +2789,14 @@ typedef struct AVCodecContext { · 1611 unmodified lines
27882789 * -initial_padding.
27892790 */
27902791 int initial_padding;
2792+
2793+ /*
2794+ * - decoding: For codecs that store a framerate value in the compressed
2795+ * bitstream, the decoder may export it here. { 0, 1} when
2796+ * unknown.
2797+ * - encoding: unused
2798+ */
2799+ AVRational framerate;
27912800 } AVCodecContext;
27922801
27932802 /**
libavcodec/cavsdec.c+1−2
@@ -1106,8 +1106,7 @@ static int decode_seq_header(AVSContext *h) · 1105 unmodified lines
11061106 h->low_delay = get_bits1(&h->gb);
11071107 h->mb_width = (h->width + 15) >> 4;
11081108 h->mb_height = (h->height + 15) >> 4;
1109− h->avctx->time_base.den = ff_mpeg12_frame_rate_tab[frame_rate_code].num;
1110− h->avctx->time_base.num = ff_mpeg12_frame_rate_tab[frame_rate_code].den;
1109+ h->avctx->framerate = ff_mpeg12_frame_rate_tab[frame_rate_code];
11111110 h->avctx->width = h->width;
11121111 h->avctx->height = h->height;
11131112 if (!h->top_qp)
libavcodec/dirac.c+1−2
@@ -172,8 +172,7 @@ static int parse_source_parameters(AVCodecContext *avctx, GetBitContext *gb, · 171 unmodified lines
172172 /* [DIRAC_STD] Table 10.3 values 9-10 */
173173 frame_rate = dirac_frame_rate[source->frame_rate_index - 9];
174174 }
175− av_reduce(&avctx->time_base.num, &avctx->time_base.den,
176− frame_rate.den, frame_rate.num, 1 << 30);
175+ avctx->framerate = frame_rate;
177176
178177 /* [DIRAC_STD] 10.3.6 Pixel Aspect Ratio.
179178 * pixel_aspect_ratio(video_params) */
libavcodec/dvdec.c+1−1
@@ -373,7 +373,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, void *data, · 372 unmodified lines
373373 s->frame->key_frame = 1;
374374 s->frame->pict_type = AV_PICTURE_TYPE_I;
375375 avctx->pix_fmt = s->sys->pix_fmt;
376− avctx->time_base = s->sys->time_base;
376+ avctx->framerate = av_inv_q(s->sys->time_base);
377377
378378 ret = ff_set_dimensions(avctx, s->sys->width, s->sys->height);
379379 if (ret < 0)
libavcodec/eacmv.c+1−1
@@ -153,7 +153,7 @@ static int cmv_process_header(CmvContext *s, const uint8_t *buf, const uint8_t * · 152 unmodified lines
153153
154154 fps = AV_RL16(&buf[10]);
155155 if (fps > 0)
156− s->avctx->time_base = (AVRational){ 1, fps };
156+ s->avctx->framerate = (AVRational){ fps, 1 };
157157
158158 pal_start = AV_RL16(&buf[12]);
159159 pal_count = AV_RL16(&buf[14]);
libavcodec/eamad.c+1−1
@@ -249,7 +249,7 @@ static int decode_frame(AVCodecContext *avctx, · 248 unmodified lines
249249 inter = (chunk_type == MADm_TAG || chunk_type == MADe_TAG);
250250 bytestream2_skip(&gb, 10);
251251
252− av_reduce(&avctx->time_base.num, &avctx->time_base.den,
252+ av_reduce(&avctx->framerate.den, &avctx->framerate.num,
253253 bytestream2_get_le16(&gb), 1000, 1<<30);
254254
255255 width = bytestream2_get_le16(&gb);
libavcodec/eatgq.c+1−1
@@ -53,7 +53,7 @@ static av_cold int tgq_decode_init(AVCodecContext *avctx) · 52 unmodified lines
5353 s->avctx = avctx;
5454 ff_init_scantable_permutation(idct_permutation, FF_IDCT_PERM_NONE);
5555 ff_init_scantable(idct_permutation, &s->scantable, ff_zigzag_direct);
56− avctx->time_base = (AVRational){1, 15};
56+ avctx->framerate = (AVRational){ 15, 1 };
5757 avctx->pix_fmt = AV_PIX_FMT_YUV420P;
5858 return 0;
5959 }
libavcodec/eatgv.c+1−1
@@ -55,7 +55,7 @@ static av_cold int tgv_decode_init(AVCodecContext *avctx) · 54 unmodified lines
5555 {
5656 TgvContext *s = avctx->priv_data;
5757 s->avctx = avctx;
58− avctx->time_base = (AVRational){1, 15};
58+ avctx->framerate = (AVRational){ 15, 1 };
5959 avctx->pix_fmt = AV_PIX_FMT_PAL8;
6060
6161 s->last_frame = av_frame_alloc();
libavcodec/eatqi.c+1−1
@@ -56,7 +56,7 @@ static av_cold int tqi_decode_init(AVCodecContext *avctx) · 55 unmodified lines
5656 ff_init_scantable_permutation(s->idsp.idct_permutation, FF_IDCT_PERM_NONE);
5757 ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_zigzag_direct);
5858 s->qscale = 1;
59− avctx->time_base = (AVRational){1, 15};
59+ avctx->framerate = (AVRational){ 15, 1 };
6060 avctx->pix_fmt = AV_PIX_FMT_YUV420P;
6161 ff_mpeg12_init_vlcs();
6262 return 0;
libavcodec/h261dec.c+1−1
@@ -478,7 +478,7 @@ static int h261_decode_picture_header(H261Context *h) · 477 unmodified lines
478478 i += 32;
479479 s->picture_number = (s->picture_number & ~31) + i;
480480
481− s->avctx->time_base = (AVRational) { 1001, 30000 };
481+ s->avctx->framerate = (AVRational) { 30000, 1001 };
482482
483483 /* PTYPE starts here */
484484 skip_bits1(&s->gb); /* split screen off */
libavcodec/h264.c+1−1
@@ -656,7 +656,7 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx) · 655 unmodified lines
656656 h->frame_recovered = 0;
657657 if (avctx->codec_id == AV_CODEC_ID_H264) {
658658 if (avctx->ticks_per_frame == 1)
659− h->avctx->time_base.den *= 2;
659+ h->avctx->framerate.num *= 2;
660660 avctx->ticks_per_frame = 2;
661661 }
662662
libavcodec/h264_slice.c+1−1
@@ -1090,7 +1090,7 @@ static int h264_slice_header_init(H264Context *h, int reinit) · 1089 unmodified lines
10901090 int64_t den = h->sps.time_scale;
10911091 if (h->x264_build < 44U)
10921092 den *= 2;
1093− av_reduce(&h->avctx->time_base.num, &h->avctx->time_base.den,
1093+ av_reduce(&h->avctx->framerate.den, &h->avctx->framerate.num,
10941094 h->sps.num_units_in_tick, den, 1 << 30);
10951095 }
10961096
libavcodec/hevc.c+1−1
@@ -442,7 +442,7 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps) · 441 unmodified lines
442442 }
443443
444444 if (num != 0 && den != 0)
445− av_reduce(&s->avctx->time_base.num, &s->avctx->time_base.den,
445+ av_reduce(&s->avctx->framerate.den, &s->avctx->framerate.num,
446446 num, den, 1 << 30);
447447
448448 return 0;
libavcodec/ituh263dec.c+10−10
@@ -81,7 +81,7 @@ void ff_h263_show_pict_info(MpegEncContext *s){ · 80 unmodified lines
8181 s->modified_quant ? " MQ" : "",
8282 s->loop_filter ? " LOOP" : "",
8383 s->h263_slice_structured ? " SS" : "",
84− s->avctx->time_base.den, s->avctx->time_base.num
84+ s->avctx->framerate.num, s->avctx->framerate.den
8585 );
8686 }
8787 }
@@ -938,7 +938,7 @@ int ff_h263_decode_picture_header(MpegEncContext *s) · 850 unmodified lines
938938 s->width = width;
939939 s->height = height;
940940 s->avctx->sample_aspect_ratio= (AVRational){12,11};
941− s->avctx->time_base= (AVRational){1001, 30000};
941+ s->avctx->framerate = (AVRational){ 30000, 1001 };
942942 } else {
943943 int ufep;
944944
@@ -1034,18 +1034,18 @@ int ff_h263_decode_picture_header(MpegEncContext *s) · 89 unmodified lines
10341034
10351035 if(s->custom_pcf){
10361036 int gcd;
1037− s->avctx->time_base.den= 1800000;
1038− s->avctx->time_base.num= 1000 + get_bits1(&s->gb);
1039− s->avctx->time_base.num*= get_bits(&s->gb, 7);
1040− if(s->avctx->time_base.num == 0){
1037+ s->avctx->framerate.num = 1800000;
1038+ s->avctx->framerate.den = 1000 + get_bits1(&s->gb);
1039+ s->avctx->framerate.den *= get_bits(&s->gb, 7);
1040+ if(s->avctx->framerate.den == 0){
10411041 av_log(s, AV_LOG_ERROR, "zero framerate\n");
10421042 return -1;
10431043 }
1044− gcd= av_gcd(s->avctx->time_base.den, s->avctx->time_base.num);
1045− s->avctx->time_base.den /= gcd;
1046− s->avctx->time_base.num /= gcd;
1044+ gcd= av_gcd(s->avctx->framerate.den, s->avctx->framerate.num);
1045+ s->avctx->framerate.den /= gcd;
1046+ s->avctx->framerate.num /= gcd;
10471047 }else{
1048− s->avctx->time_base= (AVRational){1001, 30000};
1048+ s->avctx->framerate = (AVRational){ 30000, 1001 };
10491049 }
10501050 }
10511051
libavcodec/libschroedingerdec.c+2−2
@@ -199,8 +199,8 @@ static void libschroedinger_handle_first_access_unit(AVCodecContext *avctx) · 198 unmodified lines
199199 return;
200200 }
201201
202− avctx->time_base.den = p_schro_params->format->frame_rate_numerator;
203− avctx->time_base.num = p_schro_params->format->frame_rate_denominator;
202+ avctx->framerate.num = p_schro_params->format->frame_rate_numerator;
203+ avctx->framerate.den = p_schro_params->format->frame_rate_denominator;
204204 }
205205
206206 static int libschroedinger_decode_frame(AVCodecContext *avctx,
libavcodec/mpeg12dec.c+3−4
@@ -1257,15 +1257,14 @@ static int mpeg_decode_postinit(AVCodecContext *avctx) · 1256 unmodified lines
12571257
12581258 if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO) {
12591259 // MPEG-1 fps
1260− avctx->time_base.den = ff_mpeg12_frame_rate_tab[s->frame_rate_index].num;
1261− avctx->time_base.num = ff_mpeg12_frame_rate_tab[s->frame_rate_index].den;
1260+ avctx->framerate = ff_mpeg12_frame_rate_tab[s->frame_rate_index];
12621261 // MPEG-1 aspect
12631262 avctx->sample_aspect_ratio = av_d2q(1.0 / ff_mpeg1_aspect[s->aspect_ratio_info], 255);
12641263 avctx->ticks_per_frame = 1;
12651264 } else { // MPEG-2
12661265 // MPEG-2 fps
1267− av_reduce(&s->avctx->time_base.den,
1268− &s->avctx->time_base.num,
1266+ av_reduce(&s->avctx->framerate.num,
1267+ &s->avctx->framerate.den,
12691268 ff_mpeg12_frame_rate_tab[s->frame_rate_index].num * s1->frame_rate_ext.num * 2,
12701269 ff_mpeg12_frame_rate_tab[s->frame_rate_index].den * s1->frame_rate_ext.den,
12711270 1 << 30);
libavcodec/mpeg4videodec.c+9−10
@@ -1722,23 +1722,22 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb) · 1721 unmodified lines
17221722
17231723 check_marker(gb, "before time_increment_resolution");
17241724
1725− s->avctx->time_base.den = get_bits(gb, 16);
1726− if (!s->avctx->time_base.den) {
1727− av_log(s->avctx, AV_LOG_ERROR, "time_base.den==0\n");
1728− s->avctx->time_base.num = 0;
1725+ s->avctx->framerate.num = get_bits(gb, 16);
1726+ if (!s->avctx->framerate.num) {
1727+ av_log(s->avctx, AV_LOG_ERROR, "framerate==0\n");
17291728 return -1;
17301729 }
17311730
1732− ctx->time_increment_bits = av_log2(s->avctx->time_base.den - 1) + 1;
1731+ ctx->time_increment_bits = av_log2(s->avctx->framerate.num - 1) + 1;
17331732 if (ctx->time_increment_bits < 1)
17341733 ctx->time_increment_bits = 1;
17351734
17361735 check_marker(gb, "before fixed_vop_rate");
17371736
17381737 if (get_bits1(gb) != 0) /* fixed_vop_rate */
1739− s->avctx->time_base.num = get_bits(gb, ctx->time_increment_bits);
1738+ s->avctx->framerate.den = get_bits(gb, ctx->time_increment_bits);
17401739 else
1741− s->avctx->time_base.num = 1;
1740+ s->avctx->framerate.den = 1;
17421741
17431742 ctx->t_frame = 0;
17441743
@@ -2126,19 +2125,19 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb) · 381 unmodified lines
21262125 if (s->pict_type != AV_PICTURE_TYPE_B) {
21272126 s->last_time_base = s->time_base;
21282127 s->time_base += time_incr;
2129− s->time = s->time_base * s->avctx->time_base.den + time_increment;
2128+ s->time = s->time_base * s->avctx->framerate.num + time_increment;
21302129 if (s->workaround_bugs & FF_BUG_UMP4) {
21312130 if (s->time < s->last_non_b_time) {
21322131 /* header is not mpeg-4-compatible, broken encoder,
21332132 * trying to workaround */
21342133 s->time_base++;
2135− s->time += s->avctx->time_base.den;
2134+ s->time += s->avctx->framerate.num;
21362135 }
21372136 }
21382137 s->pp_time = s->time - s->last_non_b_time;
21392138 s->last_non_b_time = s->time;
21402139 } else {
2141− s->time = (s->last_time_base + time_incr) * s->avctx->time_base.den + time_increment;
2140+ s->time = (s->last_time_base + time_incr) * s->avctx->framerate.num + time_increment;
21422141 s->pb_time = s->pp_time - (s->last_non_b_time - s->time);
21432142 if (s->pp_time <= s->pb_time ||
21442143 s->pp_time <= s->pp_time - s->pb_time ||
libavcodec/mpegvideo_parser.c+7−4
@@ -66,8 +66,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, · 65 unmodified lines
6666 did_set_size=1;
6767 }
6868 frame_rate_index = buf[3] & 0xf;
69− pc->frame_rate.den = avctx->time_base.den = ff_mpeg12_frame_rate_tab[frame_rate_index].num;
70− pc->frame_rate.num = avctx->time_base.num = ff_mpeg12_frame_rate_tab[frame_rate_index].den;
69+ pc->frame_rate = avctx->framerate = ff_mpeg12_frame_rate_tab[frame_rate_index];
7170 avctx->bit_rate = ((buf[4]<<10) | (buf[5]<<2) | (buf[6]>>6))*400;
7271 avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO;
7372 }
@@ -91,8 +90,8 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, · 17 unmodified lines
9190 avctx->bit_rate += (bit_rate_ext << 18) * 400;
9291 if(did_set_size)
9392 ff_set_dimensions(avctx, pc->width, pc->height);
94− avctx->time_base.den = pc->frame_rate.den * (frame_rate_ext_n + 1) * 2;
95− avctx->time_base.num = pc->frame_rate.num * (frame_rate_ext_d + 1);
93+ avctx->framerate.num = pc->frame_rate.num * (frame_rate_ext_n + 1) * 2;
94+ avctx->framerate.den = pc->frame_rate.den * (frame_rate_ext_d + 1);
9695 avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO;
9796 }
9897 break;
@@ -139,6 +138,10 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, · 40 unmodified lines
139138 }
140139 }
141140 the_end: ;
141+#if FF_API_AVCTX_TIMEBASE
142+ if (avctx->framerate.num)
143+ avctx->time_base = av_inv_q(avctx->framerate);
144+#endif
142145 }
143146
144147 static int mpegvideo_parse(AVCodecParserContext *s,
libavcodec/options.c+1−0
@@ -88,6 +88,7 @@ int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec) · 87 unmodified lines
8888 av_opt_set_defaults(s);
8989
9090 s->time_base = (AVRational){0,1};
91+ s->framerate = (AVRational){ 0, 1 };
9192 s->get_buffer2 = avcodec_default_get_buffer2;
9293 s->get_format = avcodec_default_get_format;
9394 s->execute = avcodec_default_execute;
libavcodec/pthread_frame.c+1−0
@@ -178,6 +178,7 @@ static int update_context_from_thread(AVCodecContext *dst, AVCodecContext *src, · 177 unmodified lines
178178
179179 if (dst != src) {
180180 dst->time_base = src->time_base;
181+ dst->framerate = src->framerate;
181182 dst->width = src->width;
182183 dst->height = src->height;
183184 dst->pix_fmt = src->pix_fmt;
libavcodec/utils.c+10−0
@@ -1262,6 +1262,11 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code · 1261 unmodified lines
12621262 ret = AVERROR(EINVAL);
12631263 goto free_and_end;
12641264 }
1265+
1266+#if FF_API_AVCTX_TIMEBASE
1267+ if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
1268+ avctx->time_base = av_inv_q(avctx->framerate);
1269+#endif
12651270 }
12661271 end:
12671272 entangled_thread_counter--;
@@ -1674,6 +1679,11 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi · 406 unmodified lines
16741679 } else
16751680 ret = 0;
16761681
1682+#if FF_API_AVCTX_TIMEBASE
1683+ if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
1684+ avctx->time_base = av_inv_q(avctx->framerate);
1685+#endif
1686+
16771687 return ret;
16781688 }
16791689
libavcodec/vaapi_mpeg4.c+1−1
@@ -88,7 +88,7 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_ · 87 unmodified lines
8888 pic_param->vop_fields.bits.alternate_vertical_scan_flag = s->alternate_scan;
8989 pic_param->vop_fcode_forward = s->f_code;
9090 pic_param->vop_fcode_backward = s->b_code;
91− pic_param->vop_time_increment_resolution = avctx->time_base.den;
91+ pic_param->vop_time_increment_resolution = avctx->framerate.num;
9292 pic_param->num_macroblocks_in_gob = s->mb_width * ff_h263_get_gob_height(s);
9393 pic_param->num_gobs_in_vop = (s->mb_width * s->mb_height) / pic_param->num_macroblocks_in_gob;
9494 pic_param->TRB = s->pb_time;
libavcodec/vc1.c+5−5
@@ -485,19 +485,19 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb) · 484 unmodified lines
485485
486486 if (get_bits1(gb)) { //framerate stuff
487487 if (get_bits1(gb)) {
488− v->s.avctx->time_base.num = 32;
489− v->s.avctx->time_base.den = get_bits(gb, 16) + 1;
488+ v->s.avctx->framerate.den = 32;
489+ v->s.avctx->framerate.num = get_bits(gb, 16) + 1;
490490 } else {
491491 int nr, dr;
492492 nr = get_bits(gb, 8);
493493 dr = get_bits(gb, 4);
494494 if (nr > 0 && nr < 8 && dr > 0 && dr < 3) {
495− v->s.avctx->time_base.num = ff_vc1_fps_dr[dr - 1];
496− v->s.avctx->time_base.den = ff_vc1_fps_nr[nr - 1] * 1000;
495+ v->s.avctx->framerate.den = ff_vc1_fps_dr[dr - 1];
496+ v->s.avctx->framerate.num = ff_vc1_fps_nr[nr - 1] * 1000;
497497 }
498498 }
499499 if (v->broadcast) { // Pulldown may be present
500− v->s.avctx->time_base.den *= 2;
500+ v->s.avctx->framerate.num *= 2;
501501 v->s.avctx->ticks_per_frame = 2;
502502 }
503503 }
libavcodec/vdpau_mpeg4.c+1−1
@@ -61,7 +61,7 @@ static int vdpau_mpeg4_start_frame(AVCodecContext *avctx, · 60 unmodified lines
6161 info->trb[0] = s->pb_time;
6262 info->trd[1] = s->pp_field_time >> 1;
6363 info->trb[1] = s->pb_field_time >> 1;
64− info->vop_time_increment_resolution = s->avctx->time_base.den;
64+ info->vop_time_increment_resolution = s->avctx->framerate.num;
6565 info->vop_fcode_forward = s->f_code;
6666 info->vop_fcode_backward = s->b_code;
6767 info->resync_marker_disable = !ctx->resync_marker;
libavcodec/version.h+4−1
@@ -29,7 +29,7 @@ · 28 unmodified lines
2929 #include "libavutil/version.h"
3030
3131 #define LIBAVCODEC_VERSION_MAJOR 56
32−#define LIBAVCODEC_VERSION_MINOR 4
32+#define LIBAVCODEC_VERSION_MINOR 5
3333 #define LIBAVCODEC_VERSION_MICRO 0
3434
3535 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
@@ -156,5 +156,8 @@ · 120 unmodified lines
156156 #ifndef FF_API_AUDIOENC_DELAY
157157 #define FF_API_AUDIOENC_DELAY (LIBAVCODEC_VERSION_MAJOR < 58)
158158 #endif
159+#ifndef FF_API_AVCTX_TIMEBASE
160+#define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 59)
161+#endif
159162
160163 #endif /* AVCODEC_VERSION_H */
libavcodec/vp3.c+1−1
@@ -2233,7 +2233,7 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb) · 2232 unmodified lines
22332233 av_log(avctx, AV_LOG_ERROR, "Invalid framerate\n");
22342234 return AVERROR_INVALIDDATA;
22352235 }
2236− av_reduce(&avctx->time_base.num, &avctx->time_base.den,
2236+ av_reduce(&avctx->framerate.den, &avctx->framerate.num,
22372237 fps.den, fps.num, 1 << 30);
22382238 }
22392239

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t