On 05/05/2011, at 15.28, Jindřich Makovička wrote:
> On Thu, May 5, 2011 at 14:44, Måns Rullgård <[email protected]> wrote:
>> Jindřich Makovička <[email protected]> writes:
>>
>>> Hi,
>>>
>>> currently, the MPEG-TS muxer does not set the Random Access indicator
>>> in the TS packet adaptation field. This causes problems with some DVB
>>> recorders (tested on Motorola set-top boxes) which refuse to record
>>> streams produced by libav.
>>>
>>> This patch adds the RA indicator to the starting packet of a each key frame.
> [...]
>>
>> I get the distinct feeling this could be done in a tidier way.
>
> Does this one look more acceptable?
Cheers – I had to deal with an ffmpeg generated stream the other day which did
not have it set.
For the actual patch, I see 3 immediate issues (not commenting on the style):
1. You are not allowed to set the flag when the stream is the PCR
(ts_st->pid == ts_st->service->pcr_pid), and the PCR field is not also written
(write_pcr).
2. For audio, you base the decision to set the flag or not based on the
last packet, when the spec require that it is the first packet.
3. You should not output the flag when there is no PTS value, though
currently it won't cause errors since PTS is always output.
Regards,
Gil
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel