On Sun, Oct 18, 2015 at 11:45 AM, Carl Eugen Hoyos <ceho...@ag.or.at> wrote: > 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(); > }
Good catch - the current AV_QSORT may actually make this a bug due to the lack of do-while. Thanks. > > Carl Eugen > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel