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

Reynaldo H. Verdejo Pinochet reynaldo at opendot.cl
Wed Sep 1 19:57:09 CEST 2010


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.
 
--
Reynaldo


More information about the MPlayer-dev-eng mailing list