[FFmpeg-devel] 答复: 答复: [PATCH] fftools/ffmpeg_ffplay_ffprobe_cmdutils: add -mask_url to replace the protocol address in the command with the asterisk (*)

Wujian(Chin) wujian2 at huawei.com
Sat Dec 24 10:51:38 EET 2022


Nicolas George(2022年12月23日 3:27):

>Wujian(Chin) (12022-12-20):
>>   I think that it's more concise to use code this way.

>Concision is not the goal here, maintainability is. Please do not use gotos.

I found that goto can be used in three cases:
1. Jump directly from multiple cycles;
2. Clear resources when errors occur.
3. Cases where clarity of the procedure can be increased.
This code simplicity does not affect the readability and maintainability of the program, and I understand that it belongs to the third case.


>>  I think that it would be better to replace the entire url, so that the code implementation is simple.

>Then replace the whole command line, it is even simpler. Also, this way you miss credentials passed through options.

The mask effect is like this:ffmpeg -mask_url -i rtsp://tyyy.com  --> ffmpeg -mask_url -i  ***************

> this way you miss credentials passed through options. 

I still don't understand. Can you go into more detail?


>> >> +    argv2 = av_mallocz(argc * sizeof(char *));
>> 
>> >sizeof(*argv2)

>Youhoud?

Sorry, I didn't get it.


> >  This option needs to replace the URL. It is more appropriate to judge  
> > mask_url and copy argv in this place. Otherwise, do you have any  
> > other suggestions?

> Use the normal options parsing system.

I understand that mask_url needs to be placed first,
because the FFmpeg process of the ps -ef command is viewed as argv,
Therefore, you need to copy argv to argv_copy immediately, mask the URL in the argv, 
and then argv_copy is a command without mask_url for the following programs.
I don't understand the difference between the normal option and the mask_url in use?

Looking forward to your reply, thank you.

> Regards,

--
  > Nicolas George

_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list