Hi, Anton Khirnov wrote: > maybe I'm not seeing something obvious, but why don't you flip the meaning of > the flag, thus avoiding the need for the new function?
That's a good question. I implemented it that way at first, but I decided to try this route since I wanted to avoid forcing the user to add special-cases in their event-handling code. Essentially, my line if thinking was; If you handle a "no carrier" event you know for certain that no carrier was present regardless of format because the demultiplexer would not raise the event unless it was relevant. It also fits fairly well into an event since its opposite is the norm. If you handle the lack of a "carrier present" event, is the carrier actually gone, or is the idea of a stream carrier not applicable for the format in question? This avoids the need for an explicit reset function, but we'd need to provide a "format has separate stream carriers" flag which the user needs to honor before handling the event, and the idea of the norm being an event feels a bit off. Between "use this function to reset event flags if you want the fancy new event to work" and "you must check format flags before handling this event," I think it's a matter of taste and I'm fine with either solution so long as the base functionality is there. I just happened to lean towards the former at the time I submitted the patch. It's entirely possible that there's another and better way of doing this than those I've listed above, but unfortunately I can't see one right now. Thoughts? Regards, John Högberg _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel