ff_get_encode_buffer() already emits an error message of its own. While just at it, also check for ret < 0 instead of just ret != 0.
Unified · Split
| @@ -918,10 +918,8 @@ static int encode_frame(VC2EncContext *s, AVPacket *avpkt, const AVFrame *frame, · 917 unmodified lines | ||
| 918 | 918 | if (field < 2) { |
| 919 | 919 | ret = ff_get_encode_buffer(s->avctx, avpkt, |
| 920 | 920 | max_frame_bytes << s->interlaced, 0); |
| 921 | − if (ret) { | |
| 922 | − av_log(s->avctx, AV_LOG_ERROR, "Error getting output packet.\n"); | |
| 921 | + if (ret < 0) | |
| 923 | 922 | return ret; |
| 924 | − } | |
| 925 | 923 | init_put_bits(&s->pb, avpkt->data, avpkt->size); |
| 926 | 924 | } |
| 927 | 925 | |