On Wed, Dec 03, 2014 at 12:48:46PM +0100, Steve Jiekak wrote: > > Signed-off-by: Steve Jiekak <devaure...@gmail.com> > --- > libavcodec/dv_profile.c | 14 +++++++++++--- > libavcodec/dv_profile.h | 2 +- > libavcodec/dvenc.c | 2 +- > libavformat/dv.c | 2 +- > libavformat/dvenc.c | 3 ++- > 5 files changed, 16 insertions(+), 7 deletions(-) > > diff --git a/libavcodec/dv_profile.c b/libavcodec/dv_profile.c > index b301cbf..5c4e23c 100644 > --- a/libavcodec/dv_profile.c > +++ b/libavcodec/dv_profile.c > @@ -312,18 +312,26 @@ const AVDVProfile *av_dv_frame_profile(const > AVDVProfile *sys, > } > > const AVDVProfile *av_dv_codec_profile(int width, int height, > - enum AVPixelFormat pix_fmt) > + enum AVPixelFormat pix_fmt, > + AVRational time_base) > { > + const AVDVProfile *p = NULL; > #if CONFIG_DVPROFILE > int i; > + /* frame rate is necessary to select between 720p50 and 720p60 profiles > */ > + int validtimebase = time_base.num == 0 || time_base.den == 0; > > for (i = 0; i < FF_ARRAY_ELEMS(dv_profiles); i++) > if (height == dv_profiles[i].height && > pix_fmt == dv_profiles[i].pix_fmt && > width == dv_profiles[i].width) > - return &dv_profiles[i]; > + { > + p = &dv_profiles[i]; > + if( !validtimebase || av_div_q(p->time_base, time_base).num == 1 > )
is av_div_q() what you meant to use or av_cmp_q() ? > + return p; > + } > #endif > > - return NULL; > + return p; > } > > diff --git a/libavcodec/dv_profile.h b/libavcodec/dv_profile.h > index d4437c9..c595f21 100644 > --- a/libavcodec/dv_profile.h > +++ b/libavcodec/dv_profile.h > @@ -81,6 +81,6 @@ const AVDVProfile *av_dv_frame_profile(const AVDVProfile > *sys, > /** > * Get a DV profile for the provided stream parameters. > */ > -const AVDVProfile *av_dv_codec_profile(int width, int height, enum > AVPixelFormat pix_fmt); > +const AVDVProfile *av_dv_codec_profile(int width, int height, enum > AVPixelFormat pix_fmt, AVRational time_base); you cannot change public API, you can add new public API if needed though make sure you bump minor version and update APIChanges accordingly though [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB While the State exists there can be no freedom; when there is freedom there will be no State. -- Vladimir Lenin
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel