Commit bbd9ced9 authored by Daniel Kamil Kozar's avatar Daniel Kamil Kozar Committed by Jean-Paul Saman

Fix generation of the video stream descriptor

dvbpsi_GenVStreamDr set the MPEG_1_only_flag incorrectly : it should be
set only if the descriptor does not carry extra information about MPEG-2
video. The previous behaviour was exactly the opposite.
Signed-off-by: default avatarJean-Paul Saman <jpsaman@videolan.org>
parent 58d55ce2
...@@ -100,7 +100,7 @@ dvbpsi_descriptor_t * dvbpsi_GenVStreamDr(dvbpsi_vstream_dr_t * p_decoded, ...@@ -100,7 +100,7 @@ dvbpsi_descriptor_t * dvbpsi_GenVStreamDr(dvbpsi_vstream_dr_t * p_decoded,
return NULL; return NULL;
/* Encode data */ /* Encode data */
p_descriptor->p_data[0] = 0; p_descriptor->p_data[0] = (p_decoded->b_mpeg2) ? 0 : 0x04;
if (p_decoded->b_multiple_frame_rate) if (p_decoded->b_multiple_frame_rate)
p_descriptor->p_data[0] |= 0x80; p_descriptor->p_data[0] |= 0x80;
p_descriptor->p_data[0] |= (p_decoded->i_frame_rate_code & 0x0f) << 3; p_descriptor->p_data[0] |= (p_decoded->i_frame_rate_code & 0x0f) << 3;
...@@ -111,7 +111,6 @@ dvbpsi_descriptor_t * dvbpsi_GenVStreamDr(dvbpsi_vstream_dr_t * p_decoded, ...@@ -111,7 +111,6 @@ dvbpsi_descriptor_t * dvbpsi_GenVStreamDr(dvbpsi_vstream_dr_t * p_decoded,
if (p_decoded->b_mpeg2) if (p_decoded->b_mpeg2)
{ {
p_descriptor->p_data[0] |= 0x04;
p_descriptor->p_data[1] = p_decoded->i_profile_level_indication; p_descriptor->p_data[1] = p_decoded->i_profile_level_indication;
p_descriptor->p_data[2] = 0x1f; p_descriptor->p_data[2] = 0x1f;
p_descriptor->p_data[2] |= (p_decoded->i_chroma_format & 0x03) << 6; p_descriptor->p_data[2] |= (p_decoded->i_chroma_format & 0x03) << 6;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment