GNOME Bugzilla – Bug 710609
asfdemux: only check mo_size if it is provided
Last modified: 2013-11-11 18:55:54 UTC
Created attachment 257818 [details] [review] bug fix - check mo_size field is not mandatory. So, don't need to mo_size value check when merge the payload. Media object size is not mandatory field in ASF specification. And actually, some file has no media object size field in payload except first payload of each ES data. Like this.... 1st payload : mo_id = 1, mo_offset = 0, mo_size = 8021 bytes 2nd payload : mo_id = 1, mo_offset = 2500 (has no mo_size) 3rd payload : mo_id = 1, mo_offset = 5000 (has no mo_size) But asf demux always check the previous payload's media object size and current payload's media object size when merge it. Cause of it, some file always fail to parse payload.
Do you have an example asf file to reproduce this issue?
Sorry, I read your comment on Today. I upload a sample file. You can reproduce with this. Thanks.
Created attachment 258266 [details] Sample file to test mo_size
Created attachment 258300 [details] [review] How about this patch? It is an improvement over yours as still does the same check, but only then a mo_size is found. What do you think?
Comment on attachment 258300 [details] [review] How about this patch? It is an improvement over yours as still does the same >+ if (prev->buf == NULL || (payload.mo_size >+ && payload.mo_size != prev->mo_size) Please use payload.mo_size > 0 or payload.mo_size != 0 here, since it's not a boolean.
Created attachment 258405 [details] [review] new patch for fix mo_size bug I attach a new patch that is apply your reviews. And I suggest that initialize the mo_size variable for sure. Please review this patch.
Thanks! Pushed as 1e74f611ee8d1c6d65d0e7963ef5dc276a07e092.