diff options
author | jstebbins <[email protected]> | 2011-08-12 22:00:51 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-08-12 22:00:51 +0000 |
commit | 5fe02b451576dbf5c914126aae1b982f6d07c4f8 (patch) | |
tree | 36e6233f5d63e0f43f9c9ef9bfdf16780e8b1af2 /libhb/hb.c | |
parent | c7dc5e69f2244206a41dea18a2f4c502c25bafb4 (diff) |
libhb: fix setting Libav codec private options
and logging of Libav advanced options.
Thanks to Rodeo for spotting
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4170 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/hb.c')
-rw-r--r-- | libhb/hb.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libhb/hb.c b/libhb/hb.c index d3d1d5668..f9bbcdc83 100644 --- a/libhb/hb.c +++ b/libhb/hb.c @@ -127,6 +127,20 @@ int hb_avcodec_close(AVCodecContext *avctx) return ret; } +int hb_av_set_string( AVCodecContext *c, AVCodec *codec, const char *name, const char *val ) +{ + void * priv_context = NULL; + + if ( c && codec && codec->priv_class && c->priv_data ) + priv_context = c->priv_data; + + int ret = av_set_string3( c, name, val, 1, NULL ); + if ( ret == AVERROR_OPTION_NOT_FOUND && priv_context ) + ret = av_set_string3( priv_context, name, val, 1, NULL ); + + return ret; +} + static int handle_jpeg(enum PixelFormat *format) { switch (*format) { |