mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-03-13 09:00:40 +08:00
avformat: add AVFormatContext.name
Analog to AVFilterContext. May be used to set a custom logging name to disambiguate multiple AVFormatContext instances in the logs.
This commit is contained in:
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2025-03-28
|
||||
|
||||
API changes, most recent first:
|
||||
|
||||
2026-02-xx - xxxxxxxxxx - lavf 62.9.100 - avformat.h
|
||||
Add AVFormatContext.name.
|
||||
|
||||
2026-01-xx - xxxxxxxxxx - lavu 60.24.100 - hwcontext_d3d11va.h
|
||||
Add BindFlags and MiscFlags to AVD3D11VADeviceContext
|
||||
|
||||
|
||||
@@ -190,6 +190,7 @@ void avformat_free_context(AVFormatContext *s)
|
||||
if (s->iformat)
|
||||
ff_flush_packet_queue(s);
|
||||
av_freep(&s->url);
|
||||
av_freep(&s->name);
|
||||
av_free(s);
|
||||
}
|
||||
|
||||
|
||||
@@ -1884,6 +1884,11 @@ typedef struct AVFormatContext {
|
||||
* @see skip_estimate_duration_from_pts
|
||||
*/
|
||||
int64_t duration_probesize;
|
||||
|
||||
/**
|
||||
* Name of this format context, only used for logging purposes.
|
||||
*/
|
||||
char *name;
|
||||
} AVFormatContext;
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,7 +45,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
static const char* format_to_name(void* ptr)
|
||||
{
|
||||
AVFormatContext* fc = (AVFormatContext*) ptr;
|
||||
if(fc->iformat) return fc->iformat->name;
|
||||
if (fc->name) return fc->name;
|
||||
else if(fc->iformat) return fc->iformat->name;
|
||||
else if(fc->oformat) return fc->oformat->name;
|
||||
else return fc->av_class->class_name;
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVFORMAT_VERSION_MINOR 8
|
||||
#define LIBAVFORMAT_VERSION_MICRO 102
|
||||
#define LIBAVFORMAT_VERSION_MINOR 9
|
||||
#define LIBAVFORMAT_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
||||
LIBAVFORMAT_VERSION_MINOR, \
|
||||
|
||||
Reference in New Issue
Block a user