Signed-off-by: Zhao, Gang <gang.zhao...@gmail.com> --- libavformat/options.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git libavformat/options.c libavformat/options.c index e14510504f..cec6ee3621 100644 --- libavformat/options.c +++ libavformat/options.c @@ -55,26 +55,28 @@ static void *format_child_next(void *obj, void *prev) static const AVClass *format_child_class_next(const AVClass *prev) { - AVInputFormat *ifmt = NULL; - AVOutputFormat *ofmt = NULL; + const AVInputFormat *ifmt; + const AVOutputFormat *ofmt; + void *demuxer_opaque = NULL; + void *muxer_opaque = NULL; if (!prev) return &ff_avio_class; - while ((ifmt = av_iformat_next(ifmt))) + while ((ifmt = av_demuxer_iterate(&demuxer_opaque))) if (ifmt->priv_class == prev) break; if (!ifmt) - while ((ofmt = av_oformat_next(ofmt))) + while ((ofmt = av_muxer_iterate(&muxer_opaque))) if (ofmt->priv_class == prev) break; if (!ofmt) - while (ifmt = av_iformat_next(ifmt)) + while (ifmt = av_demuxer_iterate(&demuxer_opaque)) if (ifmt->priv_class) return ifmt->priv_class; - while (ofmt = av_oformat_next(ofmt)) + while (ofmt = av_muxer_iterate(&muxer_opaque)) if (ofmt->priv_class) return ofmt->priv_class; -- 2.17.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".