Deprecate av_parse_video_frame_size() and av_parse_video_frame_rate()

in favor of the newly added corresponding functions
av_parse_video_size() and av_parse_video_rate() defined in
libavcore/parseutils.h.

This change also adds a linking-time dependency of libavcodec and of
libavfilter on libavcore.

Originally committed as revision 24518 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Stefano Sabatini
2010-07-26 23:12:28 +00:00
parent db9cc3a55a
commit 126b638ea0
14 changed files with 238 additions and 149 deletions

View File

@ -36,6 +36,7 @@
#include "libavutil/avstring.h"
#include "libavutil/lfg.h"
#include "libavutil/random_seed.h"
#include "libavcore/parseutils.h"
#include "libavcodec/opt.h"
#include <stdarg.h>
#include <unistd.h>
@ -4410,7 +4411,7 @@ static int parse_ffconfig(const char *filename)
} else if (!strcasecmp(cmd, "VideoSize")) {
get_arg(arg, sizeof(arg), &p);
if (stream) {
av_parse_video_frame_size(&video_enc.width, &video_enc.height, arg);
av_parse_video_size(&video_enc.width, &video_enc.height, arg);
if ((video_enc.width % 16) != 0 ||
(video_enc.height % 16) != 0) {
ERROR("Image size must be a multiple of 16\n");
@ -4420,7 +4421,7 @@ static int parse_ffconfig(const char *filename)
get_arg(arg, sizeof(arg), &p);
if (stream) {
AVRational frame_rate;
if (av_parse_video_frame_rate(&frame_rate, arg) < 0) {
if (av_parse_video_rate(&frame_rate, arg) < 0) {
ERROR("Incorrect frame rate: %s\n", arg);
} else {
video_enc.time_base.num = frame_rate.den;