On Fri, Jul 22, 2016 at 06:22:30PM +0530, Umair Khan wrote: > On Thu, Jul 21, 2016 at 6:18 PM, Michael Niedermayer > <mich...@niedermayer.cc> wrote: > > On Sun, Jul 17, 2016 at 12:06:03AM +0530, Umair Khan wrote: [...] > >> +static int decode_string(MLZDict *dict, unsigned char *buff, int > >> string_code, int *first_char_code, unsigned long bufsize) { > >> + unsigned long count, offset; > >> + int current_code, parent_code, tmp_code; > >> + > >> + count = 0; > >> + current_code = string_code; > >> + *first_char_code = CODE_UNSET; > >> + > >> + while (count < bufsize) { > >> + switch (current_code) { > >> + case CODE_UNSET: > >> + return count; > >> + break; > >> + default: > >> + if (current_code < FIRST_CODE) { > >> + *first_char_code = current_code; > >> + buff[0] = current_code; > >> + count++; > >> + return count; > >> + } else { > >> + offset = dict[current_code].match_len - 1; > >> + tmp_code = dict[current_code].char_code; > >> + buff[offset] = tmp_code; > >> + count++; > >> + } > >> + current_code = dict[current_code].parent_code; > >> + if ((current_code < 0) || (current_code > (DIC_INDEX_MAX - > >> 1))) { > > > >> + av_log(NULL, AV_LOG_ERROR, "MLZ dic index error.\n"); > > > > it would be ideal if all av_log() would have a context instead of NULL > > How to go ahead with this? Should I create MLZContext or something? If > yes, could you please tell how?
possible or you pass a void *context [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Everything should be made as simple as possible, but not simpler. -- Albert Einstein
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel