Re: [FFmpeg-devel] [PATCH 11/17] avformat/evc: don't use an AVIOContext as log context

2023-06-20 Thread James Almer

On 6/18/2023 8:43 PM, James Almer wrote:

Signed-off-by: James Almer 
---
  libavcodec/evc_parse.h | 3 ++-
  libavformat/evc.c  | 4 ++--
  2 files changed, 4 insertions(+), 3 deletions(-)


Dropped patches 11 and 12, pushed patches 13 to 17.
___
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 11/17] avformat/evc: don't use an AVIOContext as log context

2023-06-18 Thread James Almer
Signed-off-by: James Almer 
---
 libavcodec/evc_parse.h | 3 ++-
 libavformat/evc.c  | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavcodec/evc_parse.h b/libavcodec/evc_parse.h
index a1fbbc643d..677e01a64a 100644
--- a/libavcodec/evc_parse.h
+++ b/libavcodec/evc_parse.h
@@ -105,7 +105,8 @@ static inline uint32_t evc_read_nal_unit_length(const 
uint8_t *bits, int bits_si
 uint32_t nalu_len = 0;
 
 if (bits_size < EVC_NALU_LENGTH_PREFIX_SIZE) {
-av_log(logctx, AV_LOG_ERROR, "Can't read NAL unit length\n");
+if (logctx) // Don't log without a context
+av_log(logctx, AV_LOG_ERROR, "Can't read NAL unit length\n");
 return 0;
 }
 
diff --git a/libavformat/evc.c b/libavformat/evc.c
index dc75ccb56d..a7cc6167e8 100644
--- a/libavformat/evc.c
+++ b/libavformat/evc.c
@@ -359,7 +359,7 @@ int ff_isom_write_evcc(AVIOContext *pb, const uint8_t *data,
 evcc_init();
 
 while (bytes_to_read > EVC_NALU_LENGTH_PREFIX_SIZE) {
-nalu_size = evc_read_nal_unit_length(data, 
EVC_NALU_LENGTH_PREFIX_SIZE, pb);
+nalu_size = evc_read_nal_unit_length(data, 
EVC_NALU_LENGTH_PREFIX_SIZE, NULL);
 if (nalu_size == 0) break;
 
 data += EVC_NALU_LENGTH_PREFIX_SIZE;
@@ -367,7 +367,7 @@ int ff_isom_write_evcc(AVIOContext *pb, const uint8_t *data,
 
 if (bytes_to_read < nalu_size) break;
 
-nalu_type = evc_get_nalu_type(data, bytes_to_read, pb);
+nalu_type = evc_get_nalu_type(data, bytes_to_read, NULL);
 
 // @see ISO/IEC 14496-15:2021 Coding of audio-visual objects - Part 
15: section 12.3.3.3
 // NAL_unit_type indicates the type of the NAL units in the following 
array (which shall be all of that type);
-- 
2.41.0

___
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".