* Initialize one data packet for reading or writing. * @param[out] packet Packet to be initialized * @return Error code (0 if successful) */
| 252 | * @return Error code (0 if successful) |
| 253 | */ |
| 254 | static int init_packet(AVPacket **packet) |
| 255 | { |
| 256 | if (!(*packet = av_packet_alloc())) { |
| 257 | fprintf(stderr, "Could not allocate packet\n"); |
| 258 | return AVERROR(ENOMEM); |
| 259 | } |
| 260 | return 0; |
| 261 | } |
| 262 | |
| 263 | /** |
| 264 | * Initialize one audio frame for reading from the input file. |
no test coverage detected