On 23/2/22 00:21, James Almer wrote:
+int av_uuid_equal(const AVUUID uu1, const AVUUID uu2)
+{
+    return memcmp(uu1, uu2, AV_UUID_LEN) == 0;
+}
+
+void av_uuid_copy(AVUUID dest, const AVUUID src)
+{
+    memcpy(dest, src, AV_UUID_LEN);
+}
+
+void av_uuid_nil_set(AVUUID uu)
+{
+    memset(uu, 0, AV_UUID_LEN);

These three seem unnecessary. We don't need new public symbols for this when we 
can just state in the doxy that you can copy, compare or zero by assignment or 
zeroing or any such standard method.


Personally, I think it makes the intent clearer, I'd be interested in other's 
opinions on this.

Alternatively, if AVUUID is changed to a struct we could remove av_uuid_copy() 
and av_uuid_nil_set():

    typedef struct AVUUID {
        uint8_t v[AV_UUID_LEN];
    } AVUUID;

    AVUUID a;
    AVUUID b = {0};
    a = b;


_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to