This avoids having to share this table across the library
boundaries.
This shared table used to be problematic, if always declaring
all exported data symbols with the dllimport attribute (even
while building that same library), since it needs to be a
link-time constant when it is used in AVCodec declarations
(in mpeg12enc.c).
Signed-off-by: Martin Storsjö <martin@martin.st>
}
}
+static const AVRational frame_rate_tab[] = {
+ { 60, 1},
+ {60000, 1001},
+ { 50, 1},
+ { 30, 1},
+ {30000, 1001},
+ { 25, 1},
+ { 24, 1},
+ {24000, 1001},
+ { 0, 0},
+};
+
/**
* @brief convert fps tag value to AVRational fps
* @param fps fps value from tag
*/
static AVRational fps_tag2avr(int32_t fps) {
if (fps < 1 || fps > 9) fps = 9;
- return avpriv_frame_rate_tab[9 - fps]; // values have opposite order
+ return frame_rate_tab[fps - 1];
}
/**