[mythtv] problem with replex

D. Hugh Redelmeier hugh at mimosa.com
Mon Jan 7 07:26:03 UTC 2008


Thanks very much for creating and releasing replex.

The Myth TV project includes a copy of an old version of your code.
I don't know why they forked it.  Perhaps they wanted to add new
features.

I have a file that, when input to mythreplex, causes it to go into a
non-terminating loop.

The same file does not cause replex 0.1.6 to go into such a loop.

The command line is:
	replex --demux -o streamX -v 224 -a 192 /space/tmp/work/2/newfile.mpg

I really don't understand replex.  I don't know of any specifications
to follow to help me.  So I've been "brute force" testing with GDB to
see where the behaviour diverges.

It seems as if a key difference is in calculating framesize for an
audio stream (field framesize of audio_frame_t).

In replex 0.1.6, this field has type uint32_t.  And yet it is being
assigned a value of -1 by get_audio_info (as calculated by
calculate_pmg_framesize).  This seems wrong to me.  Should the frame
size be unsigned or should -1 be a legal value?

The value of framesize calculated and used in mythreplex is 0.

It turns out that the framesize of -1 makes the result "c" returned by
analyze_audio_loop one smaller.  This seems to save replex 0.1.6 from
the infinite loop that mythreplex falls into.

It almost looks like a bug in replex 0.1.6 saves it from the bad
behaviour of mythreplex.

(Note: I have not actually verified that changing mythreplex to use
framesize == -1 will actually eliminate the non-termination.)

==> should audio_frame_t's framesize be signed or unsigned?
    - if "signed", then it should be so changed
    - if "unsigned", what is the meaning of the -1 assigned to it

==> is the calculation of C that involves framesize (in this case, line
    483 of replex.c) correct when framesize == (uint32_t)-1?

    This would suggest fixes to mythreplex.

==> would it make sense for you to merge in the features of mythreplex
    so that we could have one code base?  (I have no idea of any
    politics involved in the split.)

==> is there a good document that describes the formats that replex
    works on?  It might help me understand the code.

Thanks again.


More information about the mythtv-dev mailing list