GNOME Bugzilla – Bug 123946
[PATCH] mpeg2dec-0.3.2-cvs run failure
Last modified: 2004-12-22 21:47:04 UTC
Fix attached. Works for me. Please test.
Created attachment 20496 [details] [review] give it a go
Created attachment 20497 [details] [review] This one works with 0.3.1, too
One comment: 0.3.2/0.3.1 are binary *incompatible*. This is caused by the state being -1 in 0.3.1 at the end of a buffer. In 0.3.2, this is STATE_BUFFER, which is 0. This can be fixed by changing the two parts that refer to STATE_BUFFER (which is 0 in 0.3.2 and -1 in 0.3.1...) and make them check for both STATE_BUFFER and -1 and then define STATE_BUFFER as 0, as it is in 0.3.2. I personally consider this pretty ugly, but it's a way of fixing it... Opinions?
I've implemented checking for both STATE_BUFFER (0) and -1 in CVS, so that binaries of this plugin will work with both libmpeg2-0.3.1 and -0.3.2. Patch is same as above, but with STATE_BUFFER defined as 0 instead of -1, and the two checks in the code where it checks for state being STATE_BUFFER need an additional check for state == -1.
Created attachment 20525 [details] [review] binary compatible with both libmpeg2 0.3.1 and 0.3.2
To avoid confusion please refer to the CVS version of mpeg2dec as "0.3.2-cvs" rather than "0.3.2". The interface may change before 0.3.2 is released. Thanks.
commited to 0.6.3.1 and HEAD, closing