[FFmpeg-devel] [PATCH] libavformat: Add H264 API test
Ronald S. Bultje
rsbultje at gmail.com
Mon Jun 22 14:49:42 CEST 2015
Hi,
On Mon, Jun 22, 2015 at 5:50 AM, Ludmila Glinskih <lglinskih at gmail.com>
wrote:
> + if (avcodec_decode_video2(ctx, fr, &get_frame, &pkt) < 0 ||
> get_frame == 0)
> + flag = 1;
> + if (get_frame) {
>
This sounds like you want if (avcodec_decode_video2(..) >= 0 && get_frame >
0) {. You can then use a do { .. } while (get_frame) around the loop, saves
2 lines of code.
Ronald
More information about the ffmpeg-devel
mailing list