aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ffmpeg_utils.c
blob: ce239a1c6ac190fa40fdb75cebe5379103d6a125 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "../include/ffmpeg_utils.h"

#include <string.h>
#include <libavutil/error.h>

static _Thread_local char av_error_buffer[AV_ERROR_MAX_STRING_SIZE];

const char* gsr_av_error_to_string(int err) {
    if(av_strerror(err, av_error_buffer, sizeof(av_error_buffer)) < 0)
        strcpy(av_error_buffer, "Unknown error");
    return av_error_buffer;
}