History

avcodec: Switch AVCPBProperties to 64bits

Announced in 2e8b0446c6798947dac77fee4a06f9c4e8131ab5. Two FATE-tests needed to be updated because the checksums of side data containing an AVCPBProperties struct changed. buffer_size has also been switched to 64bits because it is a bitsize.

Andreas Rheinhardt committed 5 years ago

Commit f0c7fa21 parent f3452125 files · +4 −23Browse files

Unified · Split

5 files
  1. libavcodec/avcodec.h +1 −13
  2. libavcodec/version.h +0 −3
  3. libavformat/dump.c +1 −5
  4. tests/ref/fate/mxf-d10-user-comments +1 −1
  5. tests/ref/fate/ts-demux +1 −1
libavcodec/avcodec.h+1−13
@@ -455,35 +455,23 @@ typedef struct AVCPBProperties { · 454 unmodified lines
455455 * Maximum bitrate of the stream, in bits per second.
456456 * Zero if unknown or unspecified.
457457 */
458−#if FF_API_UNSANITIZED_BITRATES
459− int max_bitrate;
460−#else
461458 int64_t max_bitrate;
462−#endif
463459 /**
464460 * Minimum bitrate of the stream, in bits per second.
465461 * Zero if unknown or unspecified.
466462 */
467−#if FF_API_UNSANITIZED_BITRATES
468− int min_bitrate;
469−#else
470463 int64_t min_bitrate;
471−#endif
472464 /**
473465 * Average bitrate of the stream, in bits per second.
474466 * Zero if unknown or unspecified.
475467 */
476−#if FF_API_UNSANITIZED_BITRATES
477− int avg_bitrate;
478−#else
479468 int64_t avg_bitrate;
480−#endif
481469
482470 /**
483471 * The size of the buffer to which the ratecontrol is applied, in bits.
484472 * Zero if unknown or unspecified.
485473 */
486− int buffer_size;
474+ int64_t buffer_size;
487475
488476 /**
489477 * The delay between the time the packet this structure is associated with
libavcodec/version.h+0−3
@@ -54,9 +54,6 @@ · 53 unmodified lines
5454 #ifndef FF_API_CODED_FRAME
5555 #define FF_API_CODED_FRAME (LIBAVCODEC_VERSION_MAJOR < 59)
5656 #endif
57−#ifndef FF_API_UNSANITIZED_BITRATES
58−#define FF_API_UNSANITIZED_BITRATES (LIBAVCODEC_VERSION_MAJOR < 59)
59−#endif
6057 #ifndef FF_API_OPENH264_SLICE_MODE
6158 #define FF_API_OPENH264_SLICE_MODE (LIBAVCODEC_VERSION_MAJOR < 59)
6259 #endif
libavformat/dump.c+1−5
@@ -322,11 +322,7 @@ static void dump_cpb(void *ctx, const AVPacketSideData *sd) · 321 unmodified lines
322322 }
323323
324324 av_log(ctx, AV_LOG_INFO,
325−#if FF_API_UNSANITIZED_BITRATES
326− "bitrate max/min/avg: %d/%d/%d buffer size: %d ",
327−#else
328− "bitrate max/min/avg: %"PRId64"/%"PRId64"/%"PRId64" buffer size: %d ",
329−#endif
325+ "bitrate max/min/avg: %"PRId64"/%"PRId64"/%"PRId64" buffer size: %"PRId64" ",
330326 cpb->max_bitrate, cpb->min_bitrate, cpb->avg_bitrate,
331327 cpb->buffer_size);
332328 if (cpb->vbv_delay == UINT64_MAX)
tests/ref/fate/mxf-d10-user-comments+1−1
@@ -6,7 +6,7 @@ · 5 unmodified lines
66 #codec_id 0: mpeg2video
77 #dimensions 0: 1280x720
88 #sar 0: 3/4
9−0, -1, 0, 1, 150000, 0x0547870d, S=1, 24, 0x5aa90ad0
9+0, -1, 0, 1, 150000, 0x0547870d, S=1, 40, 0x7ea50ad0
1010 0, 0, 1, 1, 150000, 0xe80a1612, F=0x0
1111 0, 1, 2, 1, 150000, 0xc5c50e2f, F=0x0
1212 0, 2, 3, 1, 150000, 0x51e28a04, F=0x0
tests/ref/fate/ts-demux+1−1
@@ -15,7 +15,7 @@ · 14 unmodified lines
1515 1, 5760, 5760, 2880, 1536, 0xbab5129c
1616 1, 8640, 8640, 2880, 1536, 0x602f034b, S=1, 1, 0x00bd00bd
1717 1, 11520, 11520, 2880, 906, 0x69cdcbcd
18−0, 32037, 36541, 1501, 114336, 0x37a215a8, S=2, 1, 0x00e000e0, 24, 0x663d0b52
18+0, 32037, 36541, 1501, 114336, 0x37a215a8, S=2, 1, 0x00e000e0, 40, 0x91e10b52
1919 0, 33538, 33538, 1501, 12560, 0xb559a3d4, F=0x0, S=1, 1, 0x00e000e0
2020 0, 35040, 35040, 1501, 12704, 0x2614adf4, F=0x0, S=1, 1, 0x00e000e0
2121 0, 36541, 41046, 1501, 51976, 0x9ff1dbfe, F=0x0, S=1, 1, 0x00e000e0

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