Hi,

On Sun, Feb 5, 2012 at 11:53 PM, Anton Khirnov <[email protected]> wrote:
> +        if (!ret && *got_packet_ptr &&
> +            !(avctx->codec->capabilities & CODEC_CAP_DELAY)) {
> +            avpkt->pts = avpkt->dts = frame->pts;
> +        } else if (!*got_packet_ptr)
> +            avpkt->size = 0;

I don't think you can assume *got_packet_ptr was initialized if ret !=
0, also you can invert the conditions so you don't have to include if
(*got_packet_ptr) in the first if (which thus becomes the second):

if (!ret) {
    if (!*got_packet_ptr) {
        ..
    } else if (!(avctx->codec->capabilities & CODEC_CAP_DELAY)) {
        ..
    }
}

Rest OK.

Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to