[MPlayer-dev-eng] [PATCH] EDL changes: loadfile and adjust pts functionality

Vlad Seryakov vseryakov at gmail.com
Wed Sep 1 22:04:38 CEST 2010


On Sep 1, 2010, at 1:57 PM, Reynaldo H. Verdejo Pinochet wrote:

> Hi Vlad
> 
> On Tue, Aug 31, 2010 at 03:59:18PM -0400, Vlad Seryakov wrote:
>> [...]
>> if (edl_output_filename) {
>>     if (edl_fd) fclose(edl_fd);
>>     if ((edl_fd = fopen(edl_output_filename, "w")) == NULL)
>> @@ -3971,6 +3975,13 @@
>>   int brk_cmd = 0;
>>   while( !brk_cmd && (cmd = mp_input_get_cmd(0,0,0)) != NULL) {
>>       brk_cmd = run_command(mpctx, cmd);
>> +      switch (cmd->id) {
>> +      case MP_CMD_EDL_LOADFILE:
>> +          if (edl_filename) free(edl_filename);
>> +          edl_filename = strdup(cmd->args[0].v.s);
>> +          edl_loadfile();
>> +          break;    
>> +      }
> 
> if(cmd->id == MP_CMD_EDL_LOADFILE)?
> 
> Also, I keep thinking checking for NULL in the malloced strdup
> returning pointer an terminating if out of mem might be wise,
> it certainly wouldn't hurt but I dunno what others might say.
> 
In case of NULL it will not just load any edl file which is not fatal but i added error message to detect such cases.
New patch attached

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: edlfile.txt
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100901/bda9313a/attachment.txt>


More information about the MPlayer-dev-eng mailing list