avformat/async: replace strerror with av_err2str
Fixes CID1322337 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 929451c5cba5f05fa3511bc4cec2a8ebd4a41f5d) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
7e853879ce
commit
8cd24f8fe7
@ -170,7 +170,7 @@ static int async_open(URLContext *h, const char *arg, int flags, AVDictionary **
|
|||||||
c->interrupt_callback = h->interrupt_callback;
|
c->interrupt_callback = h->interrupt_callback;
|
||||||
ret = ffurl_open(&c->inner, arg, flags, &interrupt_callback, options);
|
ret = ffurl_open(&c->inner, arg, flags, &interrupt_callback, options);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
av_log(h, AV_LOG_ERROR, "ffurl_open failed : %s, %s\n", strerror(ret), arg);
|
av_log(h, AV_LOG_ERROR, "ffurl_open failed : %s, %s\n", av_err2str(ret), arg);
|
||||||
goto url_fail;
|
goto url_fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,25 +179,25 @@ static int async_open(URLContext *h, const char *arg, int flags, AVDictionary **
|
|||||||
|
|
||||||
ret = pthread_mutex_init(&c->mutex, NULL);
|
ret = pthread_mutex_init(&c->mutex, NULL);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
av_log(h, AV_LOG_ERROR, "pthread_mutex_init failed : %s\n", strerror(ret));
|
av_log(h, AV_LOG_ERROR, "pthread_mutex_init failed : %s\n", av_err2str(ret));
|
||||||
goto mutex_fail;
|
goto mutex_fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = pthread_cond_init(&c->cond_wakeup_main, NULL);
|
ret = pthread_cond_init(&c->cond_wakeup_main, NULL);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
av_log(h, AV_LOG_ERROR, "pthread_cond_init failed : %s\n", strerror(ret));
|
av_log(h, AV_LOG_ERROR, "pthread_cond_init failed : %s\n", av_err2str(ret));
|
||||||
goto cond_wakeup_main_fail;
|
goto cond_wakeup_main_fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = pthread_cond_init(&c->cond_wakeup_background, NULL);
|
ret = pthread_cond_init(&c->cond_wakeup_background, NULL);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
av_log(h, AV_LOG_ERROR, "pthread_cond_init failed : %s\n", strerror(ret));
|
av_log(h, AV_LOG_ERROR, "pthread_cond_init failed : %s\n", av_err2str(ret));
|
||||||
goto cond_wakeup_background_fail;
|
goto cond_wakeup_background_fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = pthread_create(&c->async_buffer_thread, NULL, async_buffer_task, h);
|
ret = pthread_create(&c->async_buffer_thread, NULL, async_buffer_task, h);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
av_log(h, AV_LOG_ERROR, "pthread_create failed : %s\n", strerror(ret));
|
av_log(h, AV_LOG_ERROR, "pthread_create failed : %s\n", av_err2str(ret));
|
||||||
goto thread_fail;
|
goto thread_fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,7 +229,7 @@ static int async_close(URLContext *h)
|
|||||||
|
|
||||||
ret = pthread_join(c->async_buffer_thread, NULL);
|
ret = pthread_join(c->async_buffer_thread, NULL);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
av_log(h, AV_LOG_ERROR, "pthread_join(): %s\n", strerror(ret));
|
av_log(h, AV_LOG_ERROR, "pthread_join(): %s\n", av_err2str(ret));
|
||||||
|
|
||||||
pthread_cond_destroy(&c->cond_wakeup_background);
|
pthread_cond_destroy(&c->cond_wakeup_background);
|
||||||
pthread_cond_destroy(&c->cond_wakeup_main);
|
pthread_cond_destroy(&c->cond_wakeup_main);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user