summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-12 02:50:25 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-12 02:50:25 +0100
commit29582df797745fa6c5eec22b007e4fd3a47e7dd9 (patch)
tree59c487e218e4f750b48151d548db9091236d096f /libavutil
parent6761b6b825c4aafff311a180a09c7013288480aa (diff)
parent29ae0565d98bb41e54fc74f74c330d3214825f47 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: vble: remove vble_error_close VBLE Decoder tta: use an integer instead of a pointer to iterate output samples shorten: do not modify samples pointer when interleaving mpc7: only support stereo input. dpcm: do not try to decode empty packets dpcm: remove unneeded buf_size==0 check. twinvq: add SSE/AVX optimized sum/difference stereo interleaving vqf/twinvq: pass vqf COMM chunk info in extradata vqf: do not set bits_per_coded_sample for TwinVQ. twinvq: check for allocation failure in init_mdct_win() swscale: add padding to conversion buffer. rtpdec: Simplify finalize_packet http: Handle proxy authentication http: Print an error message for Authorization Required, too AVOptions: don't return an invalid option when option list is empty AIFF: add 'twos' FourCC for the mux/demuxer (big endian PCM audio) Conflicts: libavcodec/avcodec.h libavcodec/tta.c libavcodec/vble.c libavcodec/version.h libavutil/opt.c libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/opt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c
index 0666a60d66..2421ee8bf1 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -55,9 +55,10 @@ const AVOption *av_next_option(void *obj, const AVOption *last)
const AVOption *av_opt_next(void *obj, const AVOption *last)
{
- if (last && last[1].name) return ++last;
- else if (last || !(*(AVClass**)obj)->option->name) return NULL;
- else return (*(AVClass**)obj)->option;
+ AVClass *class = *(AVClass**)obj;
+ if (!last && class->option[0].name) return class->option;
+ if (last && last[1].name) return ++last;
+ return NULL;
}
static int read_number(const AVOption *o, void *dst, double *num, int *den, int64_t *intnum)