Commit 4c2bfabc authored by Ganesh Ajjanagadde's avatar Ganesh Ajjanagadde Committed by Marton Balint

ffplay: use correct context for av_log

Recent commits c3e8de1c and
8dc6e92c used av_log incorrectly.
This fixes such usage.
Signed-off-by: 's avatarGanesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent b67c1ab5
...@@ -456,12 +456,12 @@ static int packet_queue_init(PacketQueue *q) ...@@ -456,12 +456,12 @@ static int packet_queue_init(PacketQueue *q)
memset(q, 0, sizeof(PacketQueue)); memset(q, 0, sizeof(PacketQueue));
q->mutex = SDL_CreateMutex(); q->mutex = SDL_CreateMutex();
if (!q->mutex) { if (!q->mutex) {
av_log(q, AV_LOG_FATAL, "SDL_CreateMutex(): %s\n", SDL_GetError()); av_log(NULL, AV_LOG_FATAL, "SDL_CreateMutex(): %s\n", SDL_GetError());
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
} }
q->cond = SDL_CreateCond(); q->cond = SDL_CreateCond();
if (!q->cond) { if (!q->cond) {
av_log(q, AV_LOG_FATAL, "SDL_CreateCond(): %s\n", SDL_GetError()); av_log(NULL, AV_LOG_FATAL, "SDL_CreateCond(): %s\n", SDL_GetError());
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
} }
q->abort_request = 1; q->abort_request = 1;
...@@ -2089,7 +2089,7 @@ static int decoder_start(Decoder *d, int (*fn)(void *), void *arg) ...@@ -2089,7 +2089,7 @@ static int decoder_start(Decoder *d, int (*fn)(void *), void *arg)
packet_queue_start(d->queue); packet_queue_start(d->queue);
d->decoder_tid = SDL_CreateThread(fn, arg); d->decoder_tid = SDL_CreateThread(fn, arg);
if (!d->decoder_tid) { if (!d->decoder_tid) {
av_log(d, AV_LOG_ERROR, "SDL_CreateThread(): %s\n", SDL_GetError()); av_log(NULL, AV_LOG_ERROR, "SDL_CreateThread(): %s\n", SDL_GetError());
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
} }
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment