[FFmpeg-devel] [PATCH] all: replace qsort with AV_QSORT
Carl Eugen Hoyos
cehoyos at ag.or.at
Sun Oct 18 17:45:28 CEST 2015
Ganesh Ajjanagadde <gajjanag <at> mit.edu> writes:
> >> + if (q->sort == SUB_SORT_TS_POS) {
> >> + AV_QSORT(q->subs, q->nb_subs, AVPacket, cmp_pkt_sub_ts_pos);
> >> + }
> >> + else
> >> + AV_QSORT(q->subs, q->nb_subs, AVPacket, cmp_pkt_sub_pos_ts);
> >> +
> >
> > Weird style.
>
> There were two reasons for this:
> 1. This ensures inlining of the cmp callback.
Please use:
if (cond) {
AV_QSORT();
} else {
AV_QSORT();
}
Carl Eugen
More information about the ffmpeg-devel
mailing list