Re: [FFmpeg-devel] [PATCH v2 5/5] lavc/libxavs2.c: optimize error descriptions

2019-12-04 Thread Michael Niedermayer
On Tue, Dec 03, 2019 at 10:41:26AM +0800, hwren wrote:
> Signed-off-by: hwren 
> ---
>  libavcodec/libxavs2.c | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)

will apply

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin


signature.asc
Description: PGP signature
___
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".

[FFmpeg-devel] [PATCH v2 5/5] lavc/libxavs2.c: optimize error descriptions

2019-12-02 Thread hwren
Signed-off-by: hwren 
---
 libavcodec/libxavs2.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavcodec/libxavs2.c b/libavcodec/libxavs2.c
index 3dfe755..6ee2280 100644
--- a/libavcodec/libxavs2.c
+++ b/libavcodec/libxavs2.c
@@ -72,13 +72,13 @@ static av_cold int xavs2_init(AVCodecContext *avctx)
 /* get API handler */
 cae->api = xavs2_api_get(bit_depth);
 if (!cae->api) {
-av_log(avctx, AV_LOG_ERROR, "api get failed\n");
+av_log(avctx, AV_LOG_ERROR, "Failed to get xavs2 api context\n");
 return AVERROR_EXTERNAL;
 }
 
 cae->param = cae->api->opt_alloc();
 if (!cae->param) {
-av_log(avctx, AV_LOG_ERROR, "param alloc failed\n");
+av_log(avctx, AV_LOG_ERROR, "Failed to alloc xavs2 parameters\n");
 return AVERROR(ENOMEM);
 }
 
@@ -124,7 +124,7 @@ static av_cold int xavs2_init(AVCodecContext *avctx)
 cae->encoder = cae->api->encoder_create(cae->param);
 
 if (!cae->encoder) {
-av_log(avctx, AV_LOG_ERROR, "Can not create encoder. Null pointer 
returned\n");
+av_log(avctx, AV_LOG_ERROR, "Failed to create xavs2 encoder 
instance.\n");
 return AVERROR(EINVAL);
 }
 
@@ -183,7 +183,7 @@ static int xavs2_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
 /* create the XAVS2 video encoder */
 /* read frame data and send to the XAVS2 video encoder */
 if (cae->api->encoder_get_buffer(cae->encoder, ) < 0) {
-av_log(avctx, AV_LOG_ERROR, "failed to get frame buffer\n");
+av_log(avctx, AV_LOG_ERROR, "Failed to get xavs2 frame buffer\n");
 return AVERROR_EXTERNAL;
 }
 if (frame) {
@@ -214,7 +214,7 @@ static int xavs2_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
 ret = cae->api->encoder_encode(cae->encoder, , >packet);
 
 if (ret) {
-av_log(avctx, AV_LOG_ERROR, "encode failed\n");
+av_log(avctx, AV_LOG_ERROR, "Encoding error occured.\n");
 return AVERROR_EXTERNAL;
 }
 
@@ -224,7 +224,7 @@ static int xavs2_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
 
 if ((cae->packet.len) && (cae->packet.state != XAVS2_STATE_FLUSH_END)) {
 if (av_new_packet(pkt, cae->packet.len) < 0) {
-av_log(avctx, AV_LOG_ERROR, "packet alloc failed\n");
+av_log(avctx, AV_LOG_ERROR, "Failed to alloc xavs2 packet.\n");
 cae->api->encoder_packet_unref(cae->encoder, >packet);
 return AVERROR(ENOMEM);
 }
-- 
2.7.4

___
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".