[FFmpeg-devel] [PATCHv2] ffplay: more robust mutex creation

Ganesh Ajjanagadde gajjanag at mit.edu
Mon Oct 5 02:38:41 CEST 2015


On Sun, Oct 4, 2015 at 6:47 PM, Marton Balint <cus at passwd.hu> wrote:
>
>
> On Sun, 4 Oct 2015, Ganesh Ajjanagadde wrote:
>
>> On Sun, Oct 4, 2015 at 12:47 PM, Marton Balint <cus at passwd.hu> wrote:
>>>
>>>
>>>
>>> On Sun, 4 Oct 2015, Ganesh Ajjanagadde wrote:
>>>
>>>> SDL_CreateMutex can fail:
>>>> https://wiki.libsdl.org/SDL_CreateMutex.
>>>> This patch makes creation more robust in one instance.
>>>>
>>>> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
>>>> ---
>>>> ffplay.c | 6 ++++++
>>>> 1 file changed, 6 insertions(+)
>>>>
>>>> diff --git a/ffplay.c b/ffplay.c
>>>> index c5a7895..84bd6ee 100644
>>>> --- a/ffplay.c
>>>> +++ b/ffplay.c
>>>> @@ -2817,6 +2817,12 @@ static int read_thread(void *arg)
>>>>     int scan_all_pmts_set = 0;
>>>>     int64_t pkt_ts;
>>>>
>>>> +    if (!wait_mutex) {
>>>> +        av_log(is, AV_LOG_FATAL, "SDL_CreateMutex(): %s\n",
>>>> SDL_GetError());
>>>
>>>
>>>
>>> VideoState has no AVClass, are you sure this works? All other instances
>>> use
>>> NULL.
>>
>>
>> Entirely possible; I just (naively) assumed logging does some magic
>> e.g void* pointers or something like that. You can use v1 then.
>
>
> Applied v1. The other paches you sent seems to have the same problem, and I
> just noticed that some of your earlier patches I have already applied also
> has this issue. Could you please send fixes for those as well?
>
> Also send a patch series if you can, it is easier for me to review.

Thanks for the review. I have sent a complete patch series now with
the fixes to the old commits and the new patches. I have squashed the
introduction of error messages into a single patch, as logically it is
a single change.

>
> Thanks,
>
> Marton
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list