Re: [FFmpeg-devel] [PATCH] avcodec/v210enc: add new function for avx2 avx512 avx512icl

2022-10-29 Thread Christophe Gisquet
Hello,

Le ven. 28 oct. 2022 à 20:57, James Darnley  a écrit :
> +%else
> +pand   m1, m6, m1
> +pandn  m0, m6, m0
> +porm0, m0, m1
> +%endif

Isn't that pattern a vpblendb or some such ?

-- 
Christophe
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] GitHub releases section is very old

2022-10-29 Thread * Neustradamus *
Hello all,

It is possible to remove all releases from GitHub?
Because at right, we can see and it is not good promotion for this active 
project:
- https://github.com/FFmpeg/FFmpeg

Releases 11
FFmpeg 3.0 Release
Latest on 15 Feb 2016
+ 10 releases
- https://github.com/FFmpeg/FFmpeg/releases

The important part is here:
- https://github.com/FFmpeg/FFmpeg/tags

But it is possible to add all time in releases section, a new release with 
changelog...

Thanks in advance.

Regards,

Neustradamus
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] GitHub releases section is very old

2022-10-29 Thread Timo Rothenpieler

On 29.10.2022 14:36, * Neustradamus * wrote:

Hello all,

It is possible to remove all releases from GitHub?
Because at right, we can see and it is not good promotion for this active 
project:
- https://github.com/FFmpeg/FFmpeg

Releases 11
FFmpeg 3.0 Release
Latest on 15 Feb 2016
+ 10 releases
- https://github.com/FFmpeg/FFmpeg/releases

The important part is here:
- https://github.com/FFmpeg/FFmpeg/tags

But it is possible to add all time in releases section, a new release with 
changelog...


We should probably delete all existing releases instead, so they don't 
cause confusion like this.

Github is just a mirror, not any kind of official release channel.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH] avcodec/mpegvideo_enc: Initialize dct_unquantize_int(ra|er) only once

2022-10-29 Thread Andreas Rheinhardt
Andreas Rheinhardt:
> For encoders, mpeg_quant is an option of the MPEG-4 encoder
> and therefore constant. This implies that one can set
> the dct_unquantize_(intra|inter) function pointers during init.
> 
> Signed-off-by: Andreas Rheinhardt 
> ---
>  libavcodec/mpegvideo_enc.c | 22 +++---
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
> index ce363a585d..0b709974a1 100644
> --- a/libavcodec/mpegvideo_enc.c
> +++ b/libavcodec/mpegvideo_enc.c
> @@ -880,6 +880,17 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
>  
>  ff_dct_encode_init(s);
>  
> +if (s->mpeg_quant || s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
> +s->dct_unquantize_intra = s->dct_unquantize_mpeg2_intra;
> +s->dct_unquantize_inter = s->dct_unquantize_mpeg2_inter;
> +} else if (s->out_format == FMT_H263 || s->out_format == FMT_H261) {
> +s->dct_unquantize_intra = s->dct_unquantize_h263_intra;
> +s->dct_unquantize_inter = s->dct_unquantize_h263_inter;
> +} else {
> +s->dct_unquantize_intra = s->dct_unquantize_mpeg1_intra;
> +s->dct_unquantize_inter = s->dct_unquantize_mpeg1_inter;
> +}
> +
>  if ((CONFIG_H263P_ENCODER || CONFIG_RV20_ENCODER) && s->modified_quant)
>  s->chroma_qscale_table = ff_h263_chroma_qscale_table;
>  
> @@ -1723,17 +1734,6 @@ static int frame_start(MpegEncContext *s)
>  }
>  }
>  
> -if (s->mpeg_quant || s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
> -s->dct_unquantize_intra = s->dct_unquantize_mpeg2_intra;
> -s->dct_unquantize_inter = s->dct_unquantize_mpeg2_inter;
> -} else if (s->out_format == FMT_H263 || s->out_format == FMT_H261) {
> -s->dct_unquantize_intra = s->dct_unquantize_h263_intra;
> -s->dct_unquantize_inter = s->dct_unquantize_h263_inter;
> -} else {
> -s->dct_unquantize_intra = s->dct_unquantize_mpeg1_intra;
> -s->dct_unquantize_inter = s->dct_unquantize_mpeg1_inter;
> -}
> -
>  if (s->dct_error_sum) {
>  av_assert2(s->noise_reduction && s->encoding);
>  update_noise_reduction(s);

Will apply this patch tomorrow unless there are objections.

- Andreas

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH] configure: add pkg-config check for OpenAL

2022-10-29 Thread Timo Rothenpieler
---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 70c9e41dcc..30f0ce4e26 100755
--- a/configure
+++ b/configure
@@ -6757,7 +6757,8 @@ enabled mmal  && { check_lib mmal 
interface/mmal/mmal.h mmal_port_co
  check_lib mmal interface/mmal/mmal.h 
mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host; } ||
die "ERROR: mmal not found" &&
check_func_headers interface/mmal/mmal.h 
"MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"; }
-enabled openal&& { { for al_extralibs in "${OPENAL_LIBS}" 
"-lopenal" "-lOpenAL32"; do
+enabled openal&& { check_pkg_config openal "openal >= 1.1" 
"AL/al.h" alGetError ||
+   { for al_extralibs in "${OPENAL_LIBS}" 
"-lopenal" "-lOpenAL32"; do
check_lib openal 'AL/al.h' alGetError 
"${al_extralibs}" && break; done } ||
die "ERROR: openal not found"; } &&
  { test_cpp_condition "AL/al.h" 
"defined(AL_VERSION_1_1)" ||
-- 
2.34.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH] configure: add pkg-config check for OpenAL

2022-10-29 Thread Philip Langdale
On Sat, 29 Oct 2022 19:12:44 +0200
Timo Rothenpieler  wrote:

> ---
>  configure | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 70c9e41dcc..30f0ce4e26 100755
> --- a/configure
> +++ b/configure
> @@ -6757,7 +6757,8 @@ enabled mmal  && { check_lib mmal
> interface/mmal/mmal.h mmal_port_co check_lib mmal
> interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util
> -lmmal_vc_client -lbcm_host; } || die "ERROR: mmal not found" &&
> check_func_headers interface/mmal/mmal.h
> "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"; } -enabled openal
>  && { { for al_extralibs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32";
> do +enabled openal&& { check_pkg_config openal "openal >=
> 1.1" "AL/al.h" alGetError ||
> +   { for al_extralibs in
> "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do check_lib openal
> 'AL/al.h' alGetError "${al_extralibs}" && break; done } || die
> "ERROR: openal not found"; } && { test_cpp_condition "AL/al.h"
> "defined(AL_VERSION_1_1)" ||

LGTM

--phil
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] FFmpeg 5.0

2022-10-29 Thread Neal Gompa
On Fri, Oct 28, 2022 at 2:23 PM Michael Niedermayer
 wrote:
>
> Hi
>
> According to our
> https://trac.ffmpeg.org/wiki/Downstreams
>
> Noone and nothing is using 5.0
> should i make another release of 5.0 ?
> should i move 5.0 to olddownloads ?
>
> does anyone use it ? plan to use it or know of someone using it ?
>

Fedora 36 still uses FFmpeg 5.0 as I discovered there was an ABI break
that made upgrading to FFmpeg 5.1 not possible for F36. FFmpeg 5.1 is
used for Fedora 37, though.

This had apparently been also discovered by openSUSE some time ago:
https://build.opensuse.org/package/view_file/multimedia:libs/ffmpeg-5/work-around-abi-break.patch?expand=1

Fedora 36 will still be supported until June, so I would appreciate it
if another release of 5.0 would be made.

Do we have ABI testing in place for submitted patches? I haven't seen
any evidence of CI testing of patches submitted to the mailing list,
but maybe I'm looking in the wrong place? If there is, maybe we can
consider adding some kind of ABI testing for release branches, using
tools like libabigail[1] with abidiff[2]?

[1]: https://sourceware.org/libabigail/
[2]: https://www.mankier.com/1/abidiff



--
真実はいつも一つ!/ Always, there's only one truth!
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH 2/4] avcodec/cbs: Check ctx for NULL in ff_cbs_flush()

2022-10-29 Thread Andreas Rheinhardt
Michael Niedermayer:
> Fixes: null pointer dereference
> Fixes: 
> 52155/clusterfuzz-testcase-minimized-ffmpeg_BSF_DTS2PTS_fuzzer-5760107527143424
> 
> Found-by: continuous fuzzing process 
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
> ---
>  libavcodec/cbs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/cbs.c b/libavcodec/cbs.c
> index 504197e06d..9d59403f13 100644
> --- a/libavcodec/cbs.c
> +++ b/libavcodec/cbs.c
> @@ -120,7 +120,7 @@ av_cold int ff_cbs_init(CodedBitstreamContext **ctx_ptr,
>  
>  av_cold void ff_cbs_flush(CodedBitstreamContext *ctx)
>  {
> -if (ctx->codec->flush)
> +if (ctx && ctx->codec->flush)
>  ctx->codec->flush(ctx);
>  }
>  

The check should be in the dts2pts bsf instead.

- Andreas

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] FFmpeg 5.0

2022-10-29 Thread Timo Rothenpieler

On 29.10.2022 20:29, Neal Gompa wrote:

On Fri, Oct 28, 2022 at 2:23 PM Michael Niedermayer
 wrote:


Hi

According to our
https://trac.ffmpeg.org/wiki/Downstreams

Noone and nothing is using 5.0
should i make another release of 5.0 ?
should i move 5.0 to olddownloads ?

does anyone use it ? plan to use it or know of someone using it ?



Fedora 36 still uses FFmpeg 5.0 as I discovered there was an ABI break
that made upgrading to FFmpeg 5.1 not possible for F36. FFmpeg 5.1 is
used for Fedora 37, though.


Adding new functions does not break ABI, we've been over this in the past.
There is no guarantees made, and cannot be made, about running something 
against an older set of libraries than at compile time.

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v2 2/2] ffmpeg: fix implementation of updated input start time

2022-10-29 Thread Gyan Doshi

Any objections?

On 2022-10-25 09:28 pm, Gyan Doshi wrote:

Ping.

On 2022-10-21 10:01 pm, Gyan Doshi wrote:

The current adjustment of input start times just adjusts the tsoffset.
And it does so, by resetting the tsoffset to nullify the new start time.
This leads to breakage of -copyts, ignoring of input_ts_offset, breaking
of -isync as well as breaking wrap correction.

Fixed by taking cognizance of these parameters, and by correcting 
start times

just before sync offsets are applied.
---
  fftools/ffmpeg.c   |  2 +-
  fftools/ffmpeg.h   |  5 -
  fftools/ffmpeg_demux.c |  4 ++--
  fftools/ffmpeg_opt.c   | 33 +++--
  4 files changed, 30 insertions(+), 14 deletions(-)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 0fe582be3b..c564b2649e 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1815,7 +1815,7 @@ static void do_streamcopy(InputStream *ist, 
OutputStream *ost, const AVPacket *p

  start_time = 0;
  if (copy_ts) {
  start_time += f->start_time != AV_NOPTS_VALUE ? 
f->start_time : 0;

-    start_time += start_at_zero ? 0 : f->ctx->start_time;
+    start_time += start_at_zero ? 0 : f->start_time_effective;
  }
  if (ist->pts >= f->recording_time + start_time) {
  close_output_stream(ost);
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index 5966cac60e..2d97ccaa15 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -447,7 +447,10 @@ typedef struct InputFile {
  AVRational time_base; /* time base of the duration */
  int64_t input_ts_offset;
  int input_sync_ref;
-
+    /**
+ * Effective format start time based on enabled streams.
+ */
+    int64_t start_time_effective;
  int64_t ts_offset;
  /**
   * Extra timestamp offset added by discontinuity handling.
diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 6e89f5999a..220fda56da 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -120,7 +120,7 @@ static int seek_to_start(InputFile *ifile)
  static void ts_fixup(InputFile *ifile, AVPacket *pkt, int 
*repeat_pict)

  {
  InputStream *ist = input_streams[ifile->ist_index + 
pkt->stream_index];

-    const int64_t start_time = ifile->ctx->start_time;
+    const int64_t start_time = ifile->start_time_effective;
  int64_t duration;
    if (debug_ts) {
@@ -367,7 +367,7 @@ int ifile_get_packet(InputFile *f, AVPacket **pkt)
  if (f->readrate || f->rate_emu) {
  int i;
  int64_t file_start = copy_ts * (
-  (f->ctx->start_time != AV_NOPTS_VALUE 
? f->ctx->start_time * !start_at_zero : 0) +
+  (f->start_time_effective != 
AV_NOPTS_VALUE ? f->start_time_effective * !start_at_zero : 0) +
    (f->start_time != AV_NOPTS_VALUE ? 
f->start_time : 0)

   );
  float scale = f->rate_emu ? 1.0 : f->readrate;
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 28b7d4dc27..a6fa9b7801 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -216,13 +216,15 @@ int parse_and_set_vsync(const char *arg, int 
*vsync_var, int file_idx, int st_id

  return 0;
  }
  +/* Correct input file start times based on enabled streams */
  static void correct_input_start_times(void)
  {
-    // Correct starttime based on the enabled streams
  for (int i = 0; i < nb_input_files; i++) {
  InputFile   *ifile = input_files[i];
  AVFormatContext    *is = ifile->ctx;
-    int64_t new_start_time = INT64_MAX;
+    int64_t new_start_time = INT64_MAX, diff, abs_start_seek;
+
+    ifile->start_time_effective = is->start_time;
    if (is->start_time == AV_NOPTS_VALUE ||
  !(is->iformat->flags & AVFMT_TS_DISCONT))
@@ -234,9 +236,20 @@ static void correct_input_start_times(void)
  continue;
  new_start_time = FFMIN(new_start_time, 
av_rescale_q(st->start_time, st->time_base, AV_TIME_BASE_Q));

  }
-    if (new_start_time > is->start_time) {
-    av_log(is, AV_LOG_VERBOSE, "Correcting start time by 
%"PRId64"\n", new_start_time - is->start_time);

-    ifile->ts_offset = -new_start_time;
+
+    diff = new_start_time - is->start_time;
+    if (diff) {
+    av_log(NULL, AV_LOG_VERBOSE, "Correcting start time of 
Input #%d by %"PRId64" us.\n", i, diff);

+    ifile->start_time_effective = new_start_time;
+    if (copy_ts && start_at_zero)
+    ifile->ts_offset = -new_start_time;
+    else if (!copy_ts) {
+    abs_start_seek = is->start_time + (ifile->start_time 
!= AV_NOPTS_VALUE) ? ifile->start_time : 0;
+    ifile->ts_offset = abs_start_seek > new_start_time ? 
-abs_start_seek : -new_start_time;

+    } else if (copy_ts)
+    ifile->ts_offset = 0;
+
+    ifile->ts_offset += ifile->inp

Re: [FFmpeg-devel] [PATCH v2 1/3] avformat/imfdec: use CPL start timecode if available

2022-10-29 Thread Zane van Iperen

lgtm, will apply in a few days if no objections


On 29/10/22 00:55, Pierre-Anthony Lemieux wrote:

Hi Zane et al.,

Quick ping on the revised patchset below.

It addresses https://trac.ffmpeg.org/ticket/9842.

Best,

-- Pierre

On Sun, Oct 2, 2022 at 9:28 AM  wrote:


From: Pierre-Anthony Lemieux 

The IMF CPL contains an optional timecode start address. This patch reads the
latter, if present, into the context's timecode metadata parameter.
This addresses https://trac.ffmpeg.org/ticket/9842.

---
  libavformat/imf.h |   2 +
  libavformat/imf_cpl.c | 106 ++
  libavformat/imfdec.c  |  11 +
  3 files changed, 119 insertions(+)

diff --git a/libavformat/imf.h b/libavformat/imf.h
index 4271cd9582..70ed007312 100644
--- a/libavformat/imf.h
+++ b/libavformat/imf.h
@@ -59,6 +59,7 @@
  #include "libavformat/avio.h"
  #include "libavutil/rational.h"
  #include "libavutil/uuid.h"
+#include "libavutil/timecode.h"
  #include 

  /**
@@ -130,6 +131,7 @@ typedef struct FFIMFCPL {
  AVUUID id_uuid;   /**< CompositionPlaylist/Id 
element */
  xmlChar *content_title_utf8; /**< 
CompositionPlaylist/ContentTitle element */
  AVRational edit_rate;/**< 
CompositionPlaylist/EditRate element */
+AVTimecode *tc;  /**< 
CompositionPlaylist/CompositionTimecode element */
  FFIMFMarkerVirtualTrack *main_markers_track; /**< Main Marker Virtual 
Track */
  FFIMFTrackFileVirtualTrack *main_image_2d_track; /**< Main Image Virtual 
Track */
  uint32_t main_audio_track_count; /**< Number of Main 
Audio Virtual Tracks */
diff --git a/libavformat/imf_cpl.c b/libavformat/imf_cpl.c
index 474db6b7f5..183e6dd84e 100644
--- a/libavformat/imf_cpl.c
+++ b/libavformat/imf_cpl.c
@@ -116,6 +116,22 @@ int ff_imf_xml_read_uint32(xmlNodePtr element, uint32_t 
*number)
  return ret;
  }

+static int ff_imf_xml_read_boolean(xmlNodePtr element, int *value)
+{
+int ret = 0;
+
+xmlChar *element_text = xmlNodeListGetString(element->doc, 
element->xmlChildrenNode, 1);
+if (xmlStrcmp(element_text, "true") == 0 || xmlStrcmp(element_text, "1") 
== 0)
+*value = 1;
+else if (xmlStrcmp(element_text, "false") == 0 || xmlStrcmp(element_text, 
"0") == 0)
+*value = 0;
+else
+ret = 1;
+xmlFree(element_text);
+
+return ret;
+}
+
  static void imf_base_virtual_track_init(FFIMFBaseVirtualTrack *track)
  {
  memset(track->id_uuid, 0, sizeof(track->id_uuid));
@@ -179,6 +195,90 @@ static int fill_content_title(xmlNodePtr cpl_element, 
FFIMFCPL *cpl)
  return 0;
  }

+static int digit_to_int(char digit)
+{
+if (digit >= '0' && digit <= '9')
+return digit - '0';
+return -1;
+}
+
+/**
+ * Parses a string that conform to the TimecodeType used in IMF CPL and defined
+ * in SMPTE ST 2067-3.
+ * @param[in] s string to parse
+ * @param[out] tc_comps pointer to an array of 4 integers where the parsed HH,
+ *  MM, SS and FF fields of the timecode are returned.
+ * @return 0 on success, < 0 AVERROR code on error.
+ */
+static int parse_cpl_tc_type(const char *s, int *tc_comps)
+{
+if (av_strnlen(s, 11) != 11)
+return AVERROR(EINVAL);
+
+for (int i = 0; i < 4; i++) {
+int hi;
+int lo;
+
+hi = digit_to_int(s[i * 3]);
+lo = digit_to_int(s[i * 3 + 1]);
+
+if (hi == -1 || lo == -1)
+return AVERROR(EINVAL);
+
+tc_comps[i] = 10 * hi + lo;
+}
+
+return 0;
+}
+
+static int fill_timecode(xmlNodePtr cpl_element, FFIMFCPL *cpl)
+{
+xmlNodePtr tc_element = NULL;
+xmlNodePtr element = NULL;
+xmlChar *tc_str = NULL;
+int df = 0;
+int comps[4];
+int ret = 0;
+
+tc_element = ff_imf_xml_get_child_element_by_name(cpl_element, 
"CompositionTimecode");
+if (!tc_element)
+   return 0;
+
+element = ff_imf_xml_get_child_element_by_name(tc_element, 
"TimecodeDropFrame");
+if (!element) {
+av_log(NULL, AV_LOG_ERROR, "CompositionTimecode element is missing\
+a TimecodeDropFrame child element\n");
+return AVERROR_INVALIDDATA;
+}
+
+if (ff_imf_xml_read_boolean(element, &df)) {
+av_log(NULL, AV_LOG_ERROR, "TimecodeDropFrame element is invalid\n");
+return AVERROR_INVALIDDATA;
+}
+element = ff_imf_xml_get_child_element_by_name(tc_element, 
"TimecodeStartAddress");
+if (!element) {
+av_log(NULL, AV_LOG_ERROR, "CompositionTimecode element is missing\
+a TimecodeStartAddress child element\n");
+return AVERROR_INVALIDDATA;
+}
+
+tc_str = xmlNodeListGetString(element->doc, element->xmlChildrenNode, 1);
+ret = parse_cpl_tc_type(tc_str, comps);
+xmlFree(tc_str);
+if (ret)
+return ret;
+
+cpl->tc = av_malloc(sizeof(AVTimecode));
+